From ed05b68810d98c44d1488ef7cdeb7f726e7a8294 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 1 Jun 2022 12:34:44 +0200 Subject: [PATCH] ecs_tag/efs_tag - add resource_tags as alias for tags (#1184) ecs_tag/efs_tag - add resource_tags as alias for tags SUMMARY Cleanup related to the tagging fragment ISSUE TYPE Feature Pull Request COMPONENT NAME ecs_tag efs_tag ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis Reviewed-by: Mark Chappell (cherry picked from commit f1e1d06f5ccc26bf3458d1850aed6d599ebba6fb) --- changelogs/fragments/1184-tagging.yml | 3 +++ plugins/modules/ecs_tag.py | 3 ++- plugins/modules/efs_tag.py | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/1184-tagging.yml diff --git a/changelogs/fragments/1184-tagging.yml b/changelogs/fragments/1184-tagging.yml new file mode 100644 index 00000000000..4225df02c63 --- /dev/null +++ b/changelogs/fragments/1184-tagging.yml @@ -0,0 +1,3 @@ +minor_changes: +- ecs_tag - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1184). +- efs_tag - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1184). diff --git a/plugins/modules/ecs_tag.py b/plugins/modules/ecs_tag.py index 32915d6e0c5..87c000cd342 100644 --- a/plugins/modules/ecs_tag.py +++ b/plugins/modules/ecs_tag.py @@ -45,6 +45,7 @@ - A dictionary of tags to add or remove from the resource. - If the value provided for a tag is null and I(state=absent), the tag will be removed regardless of its current value. type: dict + aliases: ['resource_tags'] purge_tags: description: - Whether unspecified tags should be removed from the resource. @@ -155,7 +156,7 @@ def main(): argument_spec = dict( cluster_name=dict(required=True), resource=dict(required=False), - tags=dict(type='dict'), + tags=dict(type='dict', aliases=['resource_tags']), purge_tags=dict(type='bool', default=False), state=dict(default='present', choices=['present', 'absent']), resource_type=dict(default='cluster', choices=['cluster', 'task', 'service', 'task_definition', 'container']) diff --git a/plugins/modules/efs_tag.py b/plugins/modules/efs_tag.py index f44b28833dd..209c2a276d6 100644 --- a/plugins/modules/efs_tag.py +++ b/plugins/modules/efs_tag.py @@ -36,6 +36,7 @@ - If the value provided for a tag is null and I(state=absent), the tag will be removed regardless of its current value. type: dict required: True + aliases: ['resource_tags'] purge_tags: description: - Whether unspecified tags should be removed from the resource. @@ -124,7 +125,7 @@ def main(): ''' argument_spec = dict( resource=dict(required=True), - tags=dict(type='dict', required=True), + tags=dict(type='dict', required=True, aliases=['resource_tags']), purge_tags=dict(type='bool', default=False), state=dict(default='present', choices=['present', 'absent']) )