File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change
1
+ # This script is used to deploy the CDK stack using a YAML template.
2
+ npx cdk synth -c environment=test CdkbasicStack > CdkbasicStack.yaml
3
+ # Add a dummy resource to the template to force a change in the stack
4
+ awk '
5
+ /^Resources:/ && !injected {
6
+ print
7
+ print " DummyForceResource:"
8
+ print " Type: AWS::CloudFormation::WaitConditionHandle"
9
+ print " Properties: {}"
10
+ injected=1
11
+ next
12
+ }
13
+ { print }
14
+ ' CdkbasicStack.yaml > template.patched.yaml && mv template.patched.yaml CdkbasicStack.yaml
15
+ aws cloudformation deploy --template-file CdkbasicStack.yaml --stack-name test-lld-cdk-basic --capabilities CAPABILITY_NAMED_IAM
Original file line number Diff line number Diff line change 7
7
"scripts" : {
8
8
"deploy" : " cdk deploy --all -c environment=test --require-approval never --outputs-file cdk-outputs.json" ,
9
9
"build" : " cdk synth -c environment=test" ,
10
- "deploy-yaml" : " npx cdk synth -c environment=test CdkbasicStack > CdkbasicStack.yaml && aws cloudformation deploy --template-file CdkbasicStack. yaml --stack-name test-lld-cdk-basic --capabilities CAPABILITY_NAMED_IAM " ,
10
+ "deploy-yaml" : " bash deploy- yaml.sh " ,
11
11
"destroy" : " cdk destroy --all -c environment=test --force"
12
12
},
13
13
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments