This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
// SPDX-License-Identifier: MIT-0 | |
exports.SUCCESS = "SUCCESS"; | |
exports.FAILED = "FAILED"; | |
exports.send = function(event, context, responseStatus, responseData, physicalResourceId, noEcho) { | |
return new Promise((resolve, reject) => { | |
var responseBody = JSON.stringify({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: kyverno.io/v1 | |
kind: ClusterPolicy | |
metadata: | |
name: auto-vpa-creation | |
annotations: | |
policies.kyverno.io/title: Add default VPA | |
policies.kyverno.io/category: Cost Optimization | |
policies.kyverno.io/subject: Vertical Pod Autoscaler | |
policies.kyverno.io/description: >- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<title>Starter Template</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const commonBinaryMimeTypes = new Set([ | |
"application/octet-stream", | |
// Docs | |
"application/epub+zip", | |
"application/msword", | |
"application/pdf", | |
"application/rtf", | |
"application/vnd.amazon.ebook", | |
"application/vnd.ms-excel", | |
"application/vnd.ms-powerpoint", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Construct } from "constructs"; | |
import * as customResource from 'aws-cdk-lib/custom-resources'; | |
import { ClusterInfo } from "../spi"; | |
interface Tag { | |
Key: string; | |
Value: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CfnResource } from 'aws-cdk-lib'; | |
import { IConstruct } from 'constructs'; | |
export interface CfnNagSuppression { | |
readonly id: string; | |
readonly reason: string; | |
} | |
export function addCfnNagSuppression(resource: IConstruct, suppression: CfnNagSuppression): void { | |
const cfnResource = resource.node.defaultChild as CfnResource; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'execute manually' | |
exit 0 | |
# become root | |
sudo bash | |
# add vim | |
apt install vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
Description: > | |
Template for creating S3 bucket and DynamoDB table to hold Terraform state and locks | |
Validate: aws cloudformation validate-template --template-body file://terraform_state.yml | |
Deploy: aws cloudformation create-stack --region us-east-1 --stack-name Terraform-State-Resources --enable-termination-protection --template-body file://terraform_state.yml --parameters ParameterKey=TerraformStateBucketPrefix,ParameterValue=terraform-state ParameterKey=TerraformStateLockTableName,ParameterValue=terraform-state-locks | |
Parameters: | |
TerraformStateBucketPrefix: | |
Type: String | |
Default: terraform-state | |
Description: A prefix for S3 bucket name, account id will be added to ensure global uniqueness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws iam create-group --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonEC2FullAccess --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonRoute53FullAccess --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonS3FullAccess --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/IAMFullAccess --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonVPCFullAccess --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonSQSFullAccess --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonEventBridgeFullAccess --group-name kops |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as cdk from 'aws-cdk-lib'; | |
import * as pipelines from 'aws-cdk-lib/pipelines'; | |
import { Construct } from 'constructs'; | |
import { PipelineStage } from '../pipeline-stage/pipeline-stage'; | |
import { environments } from '../pipeline-config/pipeline-config'; | |
export class PipelineStack extends cdk.Stack { | |
constructor(scope: Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); |
NewerOlder