[REQUEST] CDK Deployments to Support Context
wenindoubt opened this issue · 1 comments
wenindoubt commented
Is your feature request related to a problem? Please describe.
It would be nice if the runway
configuration file supports additional CDK options, such as passing in context. For example, my cdk.json
file looks like this:
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"watch": {
"include": [
"**"
],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"yarn.lock",
"node_modules",
"test"
]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
"@aws-cdk/core:stackRelativeExports": true,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
"@aws-cdk/aws-lambda:recognizeLayerVersion": true,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true,
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
"@aws-cdk/core:checkSecretUsage": true,
"@aws-cdk/aws-iam:minimizePolicies": true,
"@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true,
"@aws-cdk/core:validateSnapshotRemovalPolicy": true,
"@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true,
"@aws-cdk/aws-s3:createDefaultLoggingPolicy": true,
"@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true,
"@aws-cdk/aws-apigateway:disableCloudWatchRole": true,
"@aws-cdk/core:enablePartitionLiterals": true,
"@aws-cdk/core:target-partitions": [
"aws",
"aws-cn"
],
"dev": {
"AWSAccountID": "XXXXX",
"Environment": "dev",
"Regions": "us-west-2"
},
"devops": {
"AWSAccountID": "XXXXX",
"Environment": "prod",
"Regions": "us-west-2"
}
}
}
Command to deploy:
npx cdk deploy --context config=dev
Describe the solution you'd like
- name: CDK Infrastructure
modules:
- path: cdk/app
environments:
dev: true
regions:
- us-west-2
context: # something like this
- config: dev # something like this
wenindoubt commented
It seems like something like this works:
- name: CDK Infrastructure (devops)
modules:
- path: cdk/app
environments:
<<: *disable_all_environments
devops: us-west-2
regions:
- us-west-2
parameters:
config: devops # <-- this is the context that gets sent to CDK