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); |
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 apigw from 'aws-cdk-lib/aws-apigateway'; | |
import * as cdk from 'aws-cdk-lib'; | |
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; | |
import * as lambda from 'aws-cdk-lib/aws-lambda'; | |
import * as nodeLambda from 'aws-cdk-lib/aws-lambda-nodejs'; | |
import * as path from 'path'; | |
import * as s3 from 'aws-cdk-lib/aws-s3'; | |
import { Construct } from 'constructs'; |
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 dynamodb from 'aws-cdk-lib/aws-dynamodb'; | |
import * as s3 from 'aws-cdk-lib/aws-s3'; | |
import { Construct } from 'constructs'; | |
import { RemovalPolicy } from 'aws-cdk-lib'; | |
export interface StatefulStackProps extends cdk.StackProps { | |
bucketName: 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 * as cdk from 'aws-cdk-lib'; | |
import { Construct } from 'constructs'; | |
import { EnvironmentConfig } from '../pipeline-types/pipeline-types'; | |
import { StatefulStack } from '../../app/stateful/stateful-stack'; | |
import { StatelessStack } from '../../app/stateless/stateless-stack'; | |
// this is our stage made up of multiple stacks which will be deployed to various environments | |
// based on config i.e. feature-dev, staging, prod, which also includes our application config | |
export class PipelineStage extends cdk.Stage { |
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 dotenv from 'dotenv'; | |
import { | |
Account, | |
EnvironmentConfig, | |
Region, | |
Stage, | |
} from '../pipeline-types/pipeline-types'; | |
dotenv.config(); |
NewerOlder