Skip to content

Instantly share code, notes, and snippets.

@yarax
Created November 20, 2019 20:10
Show Gist options
  • Save yarax/919c5b59d5b82535a03703c1d2158f6e to your computer and use it in GitHub Desktop.
Save yarax/919c5b59d5b82535a03703c1d2158f6e to your computer and use it in GitHub Desktop.
cfn
aws cloudformation update-stack --stack-name ${StackName} --template-body file://./ec2.yaml --parameters ParameterKey=KeyName,ParamaterValue=testkeypair > cfn.err 2>&1
update_output=$(cat cfn.err)
if [[ $update_output =~ ValidationError && $update_output =~ "No updates" ]]; then
echo "No updates to perform"
exit 0
fi
aws cloudformation wait stack-update-complete --stack-name ${StackName}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment