You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When both create_changeset and termination_protection are set when calling the cloudformation module, the termination_protection is not configured for the stack.
Hi @jmwyson thanks for filing the issue. Could you please let me know the following
Are you still facing the error?
Do you encounter the issue when creating a completely new cloudformation stack with create_changeset and termination_protection enabled? or when working with a stack that already exists?
What version amazon.aws are you on currently? (issue mentioned 7.5)
From my testing locally, I am unable to reproduce the issue and am able achieve the expected result when creating a new cloudformation stack. Could you please provide more detailed example for reproducing the issue?
Playbook task used for testing is
Summary
When both create_changeset and termination_protection are set when calling the cloudformation module, the termination_protection is not configured for the stack.
The problem seems to be the if logic in https://github.com/ansible-collections/amazon.aws/blob/52d3965188d45841495c1721aaf1615d08d6874d/plugins/modules/cloudformation.py#L779C1-L787C110 where if create changeset is enabled, then the "else" where the termination protection is updated, is not executed.
Issue Type
Bug Report
Component Name
cloudformation
Ansible Version
Collection Versions
AWS SDK versions
Configuration
No response
OS / Environment
No response
Steps to Reproduce
Expected Results
For an existing stack, the stack should have termination protection enabled.
Actual Results
For an existing stack, termination protection is not enabled.
Code of Conduct
The text was updated successfully, but these errors were encountered: