Skip to content

Commit

Permalink
Tagging - Add resource_tags as an alias for tags (ansible-collections…
Browse files Browse the repository at this point in the history
…#1204)

Tagging - Add resource_tags as an alias for tags

SUMMARY
There are a number of modules where we always create a fresh resource.  For now let's just add resource_tags, long term it would be good to add purge_tags and use the docs fragment.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/modules/data_pipeline.py
plugins/modules/ec2_ami_copy.py
plugins/modules/ec2_launch_template.py
plugins/modules/ecs_task.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@11fcdea
  • Loading branch information
tremble authored and github-actions[bot] committed Oct 27, 2023
1 parent 639ec88 commit df57d10
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions plugins/modules/ec2_ami_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
version_added: 1.0.0
short_description: copies AMI between AWS regions, return new image id
description:
- Copies AMI from a source region to a destination region. B(Since version 2.3 this module depends on boto3.)
- Copies AMI from a source region to a destination region. B(Since version 2.3 this module depends on boto3.)
options:
source_region:
description:
Expand Down Expand Up @@ -60,18 +60,19 @@
description:
- 'A hash/dictionary of tags to add to the new copied AMI: C({"key":"value"}) and C({"key":"value","key":"value"})'
type: dict
aliases: ['resource_tags']
tag_equality:
description:
- Whether to use tags if the source AMI already exists in the target region. If this is set, and all tags match
in an existing AMI, the AMI will not be copied again.
default: false
type: bool
author:
- Amir Moulavi (@amir343) <[email protected]>
- Tim C (@defunctio) <[email protected]>
- Amir Moulavi (@amir343) <[email protected]>
- Tim C (@defunctio) <[email protected]>
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.aws
- amazon.aws.ec2
'''

EXAMPLES = '''
Expand Down Expand Up @@ -208,7 +209,7 @@ def main():
kms_key_id=dict(type='str', required=False),
wait=dict(type='bool', default=False),
wait_timeout=dict(type='int', default=600),
tags=dict(type='dict'),
tags=dict(type='dict', aliases=['resource_tags']),
tag_equality=dict(type='bool', default=False))

module = AnsibleAWSModule(argument_spec=argument_spec)
Expand Down

0 comments on commit df57d10

Please sign in to comment.