Skip to content

Commit 344fa68

Browse files
chore: corce CF change
1 parent b703ee5 commit 344fa68

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

test/cdk-basic/deploy-yaml.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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

test/cdk-basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"deploy": "cdk deploy --all -c environment=test --require-approval never --outputs-file cdk-outputs.json",
99
"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",
1111
"destroy": "cdk destroy --all -c environment=test --force"
1212
},
1313
"devDependencies": {

0 commit comments

Comments
 (0)