Open fschroder-slyp opened 1 year ago
Files identified in the description:
plugins/modules/cloudformation_stack_set.py
](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/cloudformation_stack_set.py)If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @jillr @markuman @s-hertel @tremble click here for bot help
@fschroder-slyp Thank you for reporting this. Would you be willing to open a pull request with a patch and some integration tests?
@alinabuzachis tbh It's going to be hard to do that in the near future, but I take from your comment that you agree that the current behaviour is a bug?
Summary
The specific case is triggered when state = 'present' and no stack set or stack instances are about to be created or deleted, but rather when resources inside the stack instances are affected. For example, add or remove a cloudformation resource in the template.
Looking at the code, in main/plugins/modules/cloudformation_stack_set.py, I believe there's a missing
else:
forelif unspecified_stacks and module.params.get('purge_stack_instances'):
so that the module never proceeds with the change when check_mode is set.Issue Type
Bug Report
Component Name
cloudformation_stack_set
Ansible Version
Collection Versions
Note: I originally run this role using a very old version of the library. Since then I've updated to 5.0.0 and behaviour remains the same. Also, my original analysis of the source code was of the latest version.
AWS SDK versions
Configuration
OS / Environment
MacOS 12.6.1 (Monterrey)
Steps to Reproduce
Expected Results
Ideally, the ansible module would list what is about to be changed in the stack instance(s) and not deploy the changes. I believe this functionality is currently not provided by aws, so it would need a custom implementation.
At a minimum, the module should output a message like
Resources in stack instance(s) are potentially going to be modified
and exit the module.Actual Results
Resources in the stack instances were changed.
Code of Conduct