perform-tasks fail if cannot delete stack on removed account
davidvpe opened this issue · 2 comments
Subject of the issue
We have been deleting some accounts lately and there were no issues. But today we deleted an account and our pipeline failed because one of the tasks couldn't get deleted due to TerminationProtection.
We saw that there was a pull request that made this change #460.
We think that instead of throwing an error due to termination protection it should remove it from the state silently only if the account is not part of the organization anymore
Your environment
- version of org-foramtion (ofn --version): 1.0.9
- version of node (node --version): 14.20.0
- which OS/distro: macOS 13.2.1
Steps to reproduce
- Create a new account in
organization.yml
- Add a termination protection enabled stack on that new account
- Do
org-formation perform-tasks
to deploy that new stack - Remove the account from the
organization.yml
file - Do
org-formation perform-tasks
Expected behaviour
It should update the org (removing the account) and it should remove the stack from the state file as it's not possible to delete it (or maybe even remove termination protection?)
Actual behaviour
It fails because the task cannot be deleted due termination protection being enabled
Absolutely