Repository navigation
Switch CloudFormation OnFailure behaviour to rollback instead of dele… - #2125
Conversation
|
This is a work in progress - leaving a stack in |
If you rollback, it is true that the stack won't be deleted, but everything in it will. So they won't be able to investigate any of the resources in the stack, but they will be able to view what CF reports as the cause of error. That's probably enough though. So I'm not saying you should change it or anything. Just wanted to make sure you were aware of it. |
Yeah, that's why I said exactly that. I specifically chose (but didn't mention originally) |
What did you implement:
_Implementing Issue:_ #2087
How did you implement it:
The existing behaviour of
DELETEon CFN failure resulted in confusing outputs, that sometimes appeared as success. It also resulted in a race condition where a failure might not be seen at all due to CFN status polling (see my comment on #2087 for details).Here's the docs that correspond to the setting.
I specifically chose
ROLLBACKoverDO_NOTHINGbecause in a vast majority of cases, rollback will work fine - the user will get the error message that caused the rollback, and they can investigate the root cause in the stack (which is no longer deleted). This will work best for the most common scenario - the user has tried to create a resource they don't have permission to create (again, see #2087).In the unlikely event of a failure that leaves the stack in some other state, the stack will probably need to be deleted and recreated. This would be the case even if
DO_NOTHINGwas specified.How can we verify it:
Todos:
Write testsWrite documentationFix linting errorsMake sure code coverage hasn't dropped