amazon.aws
amazon.aws copied to clipboard
Uniform the behaviour of purge_* parameters
Summary
I have noticed that in some modules the purge_ * parameters default either to True or False. I think they should default to False instead. It would probably be best to have this consistent behavior across all modules. This would likely introduce some beraking changes.
Issue Type
Feature Idea
Component Name
several modules
Additional Information
Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct
Files identified in the description: None
If these files are inaccurate, please update the component name section of the description or use the !component bot command.
+1 to consistent behaviour ( see also consistent module naming :) )
But there's two sides to the default behaviour coin:
As a 'user' I often want purge to default to False since it's destructive (and changing from purge: False to purge: True is less likely to cause widespread damage if people don't notice the deprecation warnings). Especially for things like Tagging, I often just want to add an extra Tag.
However, the downside of this is that it moves away from Ansible's general declarative nature: "This is the final state I want the resource to be in", which would have the default behaviour be purge set to True
When we discussed this the consensus was that purge should default to True, but only take effect if the parameter to purge was explicitly passed as an empty list / dict.
eg: tags: {} or subnets: []
Yes, we can close this one. Thank you @tremble