From df57d10c08dae25315045dfb611d4b63b69dca5e Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Fri, 3 Jun 2022 15:02:37 +0200 Subject: [PATCH] Tagging - Add resource_tags as an alias for tags (#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 This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/11fcdeaa71669c57b5caf487470a4a470f6546f7 --- plugins/modules/ec2_ami_copy.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/modules/ec2_ami_copy.py b/plugins/modules/ec2_ami_copy.py index e5628b00034..ecb723dfea6 100644 --- a/plugins/modules/ec2_ami_copy.py +++ b/plugins/modules/ec2_ami_copy.py @@ -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: @@ -60,6 +60,7 @@ 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 @@ -67,11 +68,11 @@ default: false type: bool author: -- Amir Moulavi (@amir343) -- Tim C (@defunctio) + - Amir Moulavi (@amir343) + - Tim C (@defunctio) extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.ec2 ''' EXAMPLES = ''' @@ -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)