-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): pass cloudformation parameters to "cdk deploy"
Adding integration test for nested stacks. Adding section in README.
- Loading branch information
Showing
6 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
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
26 changes: 26 additions & 0 deletions
26
packages/aws-cdk/test/integ/cli/test-cdk-deploy-nested-stack-with-parameters.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
scriptdir=$(cd $(dirname $0) && pwd) | ||
source ${scriptdir}/common.bash | ||
# ---------------------------------------------------------- | ||
|
||
setup | ||
|
||
stack_arn=$(cdk deploy -v ${STACK_NAME_PREFIX}-with-nested-stack-using-parameters --parameters "MyTopicParam=ThereIsNoSpoon") | ||
echo "Stack deployed successfully" | ||
|
||
# verify that we only deployed a single stack (there's a single ARN in the output) | ||
assert_lines "${stack_arn}" 1 | ||
|
||
# verify the number of resources in the stack | ||
response_json=$(mktemp).json | ||
aws cloudformation describe-stack-resources --stack-name ${stack_arn} > ${response_json} | ||
resource_count=$(node -e "console.log(require('${response_json}').StackResources.length)") | ||
if [ "${resource_count}" -ne 1 ]; then | ||
fail "stack has ${resource_count} resources, and we expected two" | ||
fi | ||
|
||
# destroy | ||
cdk destroy -f ${STACK_NAME_PREFIX}-with-nested-stack-using-parameters | ||
|
||
echo "✅ success" |
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