-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_secrets module tries to remove system tags. #1146
Comments
Files identified in the description: If these files are inaccurate, please update the |
The module needs a |
That's a quick fix.
|
I've got a half written PR, which leaves |
@SantiRaposo thanks for the report here. #1150, which will hopefully be included in release 4.0.0, should mitigate the issue for your example: if you don't explicitly set tags, then it won't try to update them (which is our usual behaviour). Separately I've opened ansible-collections/amazon.aws#817 to update our helper code so that it doesn't try to manage the 'aws:' tags (unless someone explicitly passes them). |
aws_secret - Support purge_tags SUMMARY aws_secret currently defaults to purging all tags (even if tags isn't specified), this is a little aggressive. Add purge_tags parameter Only purge tags if tags: {} is set (rather than when tags is None ISSUE TYPE Feature Pull Request COMPONENT NAME aws_secret ADDITIONAL INFORMATION Related to #1146 Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Mark Chappell <None> Reviewed-by: Alina Buzachis <None>
With release 4.0.0 of the amazon.aws collection we will ignore However, because the change necessary to ignore tags prefixed with 'aws:' has the potential to break playbooks running on "AWS compatible" platforms we won't be backporting a fix for this to the 2.x and 3.x releases. |
Add changelog fragment for amazon.aws/825 SUMMARY With ansible-collections/amazon.aws#825 we now ignore aws: tags when purging. Since affects both amazon.aws and community.aws add a changelog note to community.aws ISSUE TYPE Docs Pull Request COMPONENT NAME changelogs/fragments/817-skip_purge_aws.yaml ADDITIONAL INFORMATION See also: ansible-collections/amazon.aws#825 ansible-collections/amazon.aws#817 #1146 Reviewed-by: Alina Buzachis <None>
Deprecate module_utils.urls SUMMARY Originally introduced in ansible/ansible#42758, as far as I can tell the module_utils/urls.py has never actually been used by a module. It's primary purpose was to add support for Sigv4, but boto3/botocore support this out of the box now and we shouldn't be reimplementing it. We have no tests for this code, nothing's using it, and it's in the "supported" repo. Let's prune out this code, if someone external's using it hopefully someone will raise an issue and we can reconsider the deprecation. ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/module_utils/urls.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None>
Summary
When using the aws_secrets to modify a secret created using AWS CloudFormation and not specifying any tags the
tag
argument the module tries to remove the reserved system tags (all tags starting withaws:
, the stack id the resource belongs to for instance).These tags cannot be modified or deleted, so the module should ignore them when processing tags.
Issue Type
Bug Report
Component Name
community.aws.aws_secret module
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Debian Bullseye
Steps to Reproduce
Expected Results
I expected the module to not attempt to modify system tags. Instead, the module attempts to remove system tags and fails with an error.
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: