Skip to content

Commit

Permalink
ecs_tag/efs_tag - add resource_tags as alias for tags (#1184) (#1191)
Browse files Browse the repository at this point in the history
[PR #1184/f1e1d06f backport][stable-3] ecs_tag/efs_tag - add resource_tags as alias for tags

This is a backport of PR #1184 as merged into main (f1e1d06).
SUMMARY
Cleanup related to the tagging fragment
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ecs_tag
efs_tag
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
  • Loading branch information
patchback[bot] authored Jun 1, 2022
1 parent 7b8b588 commit 1c3c01b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/1184-tagging.yml
Original file line number Diff line number Diff line change
@@ -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).
3 changes: 2 additions & 1 deletion plugins/modules/ecs_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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'])
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/efs_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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'])
)
Expand Down

0 comments on commit 1c3c01b

Please sign in to comment.