Skip to content
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

compare_aws_tags should ignore tags with the prefix 'aws:' #817

Closed
1 task done
tremble opened this issue May 18, 2022 · 2 comments · Fixed by #825
Closed
1 task done

compare_aws_tags should ignore tags with the prefix 'aws:' #817

tremble opened this issue May 18, 2022 · 2 comments · Fixed by #825
Labels
feature This issue/PR relates to a feature request module_utils module_utils needs_triage plugins plugin (any type)

Comments

@tremble
Copy link
Contributor

tremble commented May 18, 2022

Summary

See also: ansible-collections/community.aws#1146

According to the AWS documentation

System created tags that begin with aws: are reserved for AWS use ... You can't edit or delete a tag that begins with the aws: prefix.

The most common use case here is AWS CloudFormation, which adds a "aws:cloudformation:stack-name" tag. Since we can't manage these tags at all we should probably ignore them for the purposes of 'purging'. If someone explicitly adds the tag, then I think it's reasonable to let the APIs throw an error at them, but otherwise we should try to do the best we can. A possible alternative would be throwing a warning, but that gets a little ugly.

Issue Type

Feature Idea

Component Name

plugins/module_utils/tagging.py

Additional Information

No response

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module_utils module_utils needs_triage plugins plugin (any type) labels May 18, 2022
@markuman
Copy link
Member

imo this must be priorized

softwarefactory-project-zuul bot pushed a commit that referenced this issue May 27, 2022
Do not purge 'aws:*' tags

SUMMARY
fixes: #817
According to the AWS documentation

System created tags that begin with aws: are reserved for AWS use ... You can't edit or delete a tag that begins with the aws: prefix.

The most common use case here is AWS CloudFormation, which adds a "aws:cloudformation:stack-name" tag.  Since we can't manage these tags at all we should ignore them for the purposes of 'purging'.  If someone explicitly adds the tag, then it's reasonable to let the APIs throw an error at them, but otherwise do the best we can.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/module_utils/tagging.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Joseph Torcasso <None>
softwarefactory-project-zuul bot pushed a commit to ansible-collections/community.aws that referenced this issue May 30, 2022
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>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Sep 18, 2023
Fix short EKS cluster names

SUMMARY
Fixes ansible-collections#817
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

aws_eks
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Sep 18, 2023
Fix short EKS cluster names

SUMMARY
Fixes ansible-collections#817
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

aws_eks
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Oct 24, 2023
Fix short EKS cluster names

SUMMARY
Fixes ansible-collections#817
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

aws_eks
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request module_utils module_utils needs_triage plugins plugin (any type)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants