When running a replace template pass using CloudFormation and the replace template fails to run, processing continues on to the next replace template file
Expected Behaviour
When a stack execution fails or rolls back it should cancel any further processing and raise an error to the user
Possible Solution
Check for status on repalce stack executions and fail the script
Steps to Reproduce
Add a component which has replace template support ( sqs, rds )
Run a deployment which generates a failure in template processing
Run the deployment and observe the status
(Info) Executing replace template : soln-queue-mswdev02-ap-southeast-2-replace1-template...
{
"Id": "arn:aws:cloudformation:ap-southeast-2:123456789:changeSet/soln-queue-mswdev02-ap-southeast-2-replace1-template-1616377693/234d196c-d93e-4da2-9e4a-d8a1e34ce2cf",
"StackId": "arn:aws:cloudformation:ap-southeast-2:123456789:stack/walksregister-integration-roleyfoley-soln-queue/7f69d670-8aad-11eb-8341-06f785856d72"
}
(Info) Watching stack execution...
"StackStatus": "UPDATE_IN_PROGRESS",
"StackStatusReason": "User Initiated",
"StackStatus": "UPDATE_ROLLBACK_COMPLETE",
(Warn) Stack walksregister-integration-roleyfoley-soln-queue could not complete and a rollback was performed
(Info) Executing replace template : soln-queue-mswdev02-ap-southeast-2-replace2-template...
{
"Id": "arn:aws:cloudformation:ap-southeast-2:123456789:changeSet/soln-queue-mswdev02-ap-southeast-2-replace2-template-1616377758/5fa151c3-7860-44b7-ad85-736219528f3d",
"StackId": "arn:aws:cloudformation:ap-southeast-2:123456789:stack/walksregister-integration-roleyfoley-soln-queue/7f69d670-8aad-11eb-8341-06f785856d72"
}
(Info) Watching stack execution...
"StackStatus": "UPDATE_IN_PROGRESS",
"StackStatusReason": "User Initiated",
"StackStatus": "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS",
"StackStatus": "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS",
"StackStatus": "UPDATE_COMPLETE",
(Info) Update completed for walksregister-integration-roleyfoley-soln-queue
Current Behaviour
When running a replace template pass using CloudFormation and the replace template fails to run, processing continues on to the next replace template file
Expected Behaviour
When a stack execution fails or rolls back it should cancel any further processing and raise an error to the user
Possible Solution
Check for status on repalce stack executions and fail the script
Steps to Reproduce