diff --git a/changelogs/fragments/1182-tagging.yml b/changelogs/fragments/1182-tagging.yml new file mode 100644 index 00000000000..1dec486ae34 --- /dev/null +++ b/changelogs/fragments/1182-tagging.yml @@ -0,0 +1,16 @@ +minor_changes: +- aws_glue_job - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- aws_msk_cluster - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- aws_secret - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- aws_step_functions_state_machine - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- ec2_eip - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- ec2_vpc_peer - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- elb_application_lb - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- elb_network_lb - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- iam_role - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- iam_user - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- rds_cluster - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- rds_instance - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- rds_option_group - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- rds_subnet_group - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). +- redshift - ``resource_tags`` has been added as an alias for the ``tags`` parameter (https://github.com/ansible-collections/community.aws/pull/1182). diff --git a/plugins/modules/aws_glue_job.py b/plugins/modules/aws_glue_job.py index 4e278c81734..e95e9d69163 100644 --- a/plugins/modules/aws_glue_job.py +++ b/plugins/modules/aws_glue_job.py @@ -12,7 +12,7 @@ version_added: 1.0.0 short_description: Manage an AWS Glue job description: - - Manage an AWS Glue job. See U(https://aws.amazon.com/glue/) for details. + - Manage an AWS Glue job. See U(https://aws.amazon.com/glue/) for details. author: - "Rob White (@wimnat)" - "Vijayanand Sharma (@vijayanandsharma)" @@ -77,13 +77,6 @@ - The number of workers of a defined workerType that are allocated when a job runs. type: int version_added: 1.5.0 - purge_tags: - description: - - If C(true), existing tags will be purged from the resource to match exactly what is defined by I(tags) parameter. - - If the I(tags) parameter is not set then tags will not be modified. - default: true - type: bool - version_added: 2.2.0 role: description: - The name or ARN of the IAM role associated with this job. @@ -95,12 +88,6 @@ required: true choices: [ 'present', 'absent' ] type: str - tags: - description: - - A hash/dictionary of tags to be applied to the job. - - Remove completely or specify an empty dictionary to remove all tags. - type: dict - version_added: 2.2.0 timeout: description: - The job timeout in minutes. @@ -111,10 +98,12 @@ choices: [ 'Standard', 'G.1X', 'G.2X' ] type: str version_added: 1.5.0 +notes: + - Support for I(tags) and I(purge_tags) was added in release 2.2.0. extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = r''' @@ -463,7 +452,7 @@ def main(): purge_tags=dict(type='bool', default=True), role=dict(type='str'), state=dict(required=True, choices=['present', 'absent'], type='str'), - tags=dict(type='dict'), + tags=dict(type='dict', aliases=['resource_tags']), timeout=dict(type='int'), worker_type=dict(choices=['Standard', 'G.1X', 'G.2X'], type='str'), ) diff --git a/plugins/modules/aws_msk_cluster.py b/plugins/modules/aws_msk_cluster.py index 320b867680b..559660d786f 100644 --- a/plugins/modules/aws_msk_cluster.py +++ b/plugins/modules/aws_msk_cluster.py @@ -10,7 +10,7 @@ DOCUMENTATION = r""" --- module: aws_msk_cluster -short_description: Manage Amazon MSK clusters. +short_description: Manage Amazon MSK clusters version_added: "2.0.0" description: - Create, delete and modify Amazon MSK (Managed Streaming for Apache Kafka) clusters. @@ -198,16 +198,10 @@ description: How many seconds to wait. Cluster creation can take up to 20-30 minutes. type: int default: 3600 - tags: - description: Tag dictionary to apply to the cluster. - type: dict - purge_tags: - description: Remove tags not listed in I(tags) when tags is specified. - default: true - type: bool extends_documentation_fragment: - amazon.aws.aws - amazon.aws.ec2 + - amazon.aws.tags notes: - All operations are time consuming, for example create takes 20-30 minutes, update kafka version -- more than one hour, update configuration -- 10-15 minutes; @@ -769,7 +763,7 @@ def main(): ), wait=dict(type="bool", default=False), wait_timeout=dict(type="int", default=3600), - tags=dict(type='dict'), + tags=dict(type='dict', aliases=['resource_tags']), purge_tags=dict(type='bool', default=True), ) diff --git a/plugins/modules/aws_secret.py b/plugins/modules/aws_secret.py index 7ebce8da603..044ba1061ae 100644 --- a/plugins/modules/aws_secret.py +++ b/plugins/modules/aws_secret.py @@ -10,10 +10,11 @@ --- module: aws_secret version_added: 1.0.0 -short_description: Manage secrets stored in AWS Secrets Manager. +short_description: Manage secrets stored in AWS Secrets Manager description: - - Create, update, and delete secrets stored in AWS Secrets Manager. -author: "REY Remi (@rrey)" + - Create, update, and delete secrets stored in AWS Secrets Manager. +author: + - "REY Remi (@rrey)" options: name: description: @@ -60,19 +61,6 @@ required: false type: json version_added: 3.1.0 - tags: - description: - - Specifies a dictionary of user-defined tags that are attached to the secret. - - To remove all tags set I(tags={}) and I(purge_tags=true). - type: dict - purge_tags: - description: - - If I(purge_tags=true) and I(tags) is set, existing tags will be purged from the resource - to match exactly what is defined by I(tags) parameter. - type: bool - required: false - default: true - version_added: 4.0.0 rotation_lambda: description: - Specifies the ARN of the Lambda function that can rotate the secret. @@ -83,9 +71,11 @@ default: 30 type: int extends_documentation_fragment: -- amazon.aws.ec2 -- amazon.aws.aws - + - amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.tags +notes: + - Support for I(purge_tags) was added in release 4.0.0. ''' EXAMPLES = r''' @@ -432,7 +422,7 @@ def main(): 'secret_type': dict(choices=['binary', 'string'], default="string"), 'secret': dict(default="", no_log=True), 'resource_policy': dict(type='json', default=None), - 'tags': dict(type='dict', default=None), + 'tags': dict(type='dict', default=None, aliases=['resource_tags']), 'purge_tags': dict(type='bool', default=True), 'rotation_lambda': dict(), 'rotation_interval': dict(type='int', default=30), diff --git a/plugins/modules/aws_step_functions_state_machine.py b/plugins/modules/aws_step_functions_state_machine.py index be9d594d7c2..452ebc4237a 100644 --- a/plugins/modules/aws_step_functions_state_machine.py +++ b/plugins/modules/aws_step_functions_state_machine.py @@ -11,14 +11,11 @@ --- module: aws_step_functions_state_machine version_added: 1.0.0 - short_description: Manage AWS Step Functions state machines - - description: - - Create, update and delete state machines in AWS Step Functions. - - Calling the module in C(state=present) for an existing AWS Step Functions state machine - will attempt to update the state machine definition, IAM Role, or tags with the provided data. + - Create, update and delete state machines in AWS Step Functions. + - Calling the module in C(state=present) for an existing AWS Step Functions state machine + will attempt to update the state machine definition, IAM Role, or tags with the provided data. options: name: @@ -44,24 +41,13 @@ default: present choices: [ present, absent ] type: str - tags: - description: - - A hash/dictionary of tags to add to the new state machine or to add/remove from an existing one. - type: dict - purge_tags: - description: - - If yes, existing tags will be purged from the resource to match exactly what is defined by I(tags) parameter. - If the I(tags) parameter is not set then tags will not be modified. - default: yes - type: bool extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - - + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags author: - - Tom De Keyser (@tdekeyser) + - Tom De Keyser (@tdekeyser) ''' EXAMPLES = ''' @@ -210,7 +196,7 @@ def main(): definition=dict(type='json'), role_arn=dict(type='str'), state=dict(choices=['present', 'absent'], default='present'), - tags=dict(default=None, type='dict'), + tags=dict(default=None, type='dict', aliases=['resource_tags']), purge_tags=dict(default=True, type='bool'), ) module = AnsibleAWSModule( diff --git a/plugins/modules/ec2_eip.py b/plugins/modules/ec2_eip.py index 37ef0fa7540..531af689792 100644 --- a/plugins/modules/ec2_eip.py +++ b/plugins/modules/ec2_eip.py @@ -14,8 +14,8 @@ version_added: 1.0.0 short_description: manages EC2 elastic IP (EIP) addresses. description: - - This module can allocate or release an EIP. - - This module can associate/disassociate an EIP with instances or network interfaces. + - This module can allocate or release an EIP. + - This module can associate/disassociate an EIP with instances or network interfaces. options: device_id: description: @@ -64,16 +64,6 @@ network interface or instance to be re-associated with the specified instance or interface. default: false type: bool - tags: - description: A dictionary of tags to apply to the EIP. - type: dict - version_added: 2.1.0 - purge_tags: - description: Whether the I(tags) argument should cause tags not in the - dictionary to be removed. - default: True - type: bool - version_added: 2.1.0 tag_name: description: - When I(reuse_existing_ip_allowed=true), supplement with this option to only reuse @@ -89,18 +79,21 @@ only applies to newly allocated Elastic IPs, isn't validated when I(reuse_existing_ip_allowed=true). type: str extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags -author: "Rick Mendes (@rickmendes) " +author: + - "Rick Mendes (@rickmendes) " notes: - - There may be a delay between the time the EIP is assigned and when - the cloud instance is reachable via the new address. Use wait_for and - pause to delay further playbook execution until the instance is reachable, - if necessary. - - This module returns multiple changed statuses on disassociation or release. - It returns an overall status based on any changes occurring. It also returns - individual changed statuses for disassociation and release. + - There may be a delay between the time the EIP is assigned and when + the cloud instance is reachable via the new address. Use wait_for and + pause to delay further playbook execution until the instance is reachable, + if necessary. + - This module returns multiple changed statuses on disassociation or release. + It returns an overall status based on any changes occurring. It also returns + individual changed statuses for disassociation and release. + - Support for I(tags) and I(purge_tags) was added in release 2.1.0. ''' EXAMPLES = ''' @@ -543,7 +536,7 @@ def main(): release_on_disassociation=dict(required=False, type='bool', default=False), allow_reassociation=dict(type='bool', default=False), private_ip_address=dict(), - tags=dict(required=False, type='dict'), + tags=dict(required=False, type='dict', aliases=['resource_tags']), purge_tags=dict(required=False, type='bool', default=True), tag_name=dict(), tag_value=dict(), diff --git a/plugins/modules/ec2_transit_gateway_vpc_attachment.py b/plugins/modules/ec2_transit_gateway_vpc_attachment.py index 13518fdbe2a..7f2fc2988ba 100644 --- a/plugins/modules/ec2_transit_gateway_vpc_attachment.py +++ b/plugins/modules/ec2_transit_gateway_vpc_attachment.py @@ -81,22 +81,6 @@ for the life of a flow to send traffic to. type: bool required: false - tags: - description: - - A dictionary representing the tags associated with the Transit Gateway - attachment. - - 'For example C({"Example Tag": "some example value"})' - - Unless I(purge_tags=False) all other tags will be removed from the - attachment. - type: dict - required: false - purge_tags: - description: - - If I(purge_tags=true), existing tags will be purged from the resource - to match exactly what is defined by I(tags) parameter. - type: bool - required: false - default: true wait: description: - Whether to wait for the Transit Gateway attachment to reach the @@ -111,10 +95,12 @@ - Defaults to 600 seconds. type: int required: false -author: "Mark Chappell (@tremble)" +author: + - "Mark Chappell (@tremble)" extends_documentation_fragment: - amazon.aws.aws - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = ''' @@ -246,7 +232,7 @@ def main(): name=dict(type='str', required=False), subnets=dict(type='list', elements='str', required=False), purge_subnets=dict(type='bool', required=False, default=True), - tags=dict(type='dict', required=False), + tags=dict(type='dict', required=False, aliases=['resource_tags']), purge_tags=dict(type='bool', required=False, default=True), appliance_mode_support=dict(type='bool', required=False), dns_support=dict(type='bool', required=False), diff --git a/plugins/modules/ec2_vpc_peer.py b/plugins/modules/ec2_vpc_peer.py index b651b173ce4..79bcbf58b59 100644 --- a/plugins/modules/ec2_vpc_peer.py +++ b/plugins/modules/ec2_vpc_peer.py @@ -39,17 +39,6 @@ - The AWS account number for cross account peering. required: false type: str - tags: - description: - - Dictionary of tags to look for and apply when creating a Peering Connection. - required: false - type: dict - purge_tags: - description: - - Remove tags not listed in I(tags). - type: bool - default: true - version_added: 2.0.0 state: description: - Create, delete, accept, reject a peering connection. @@ -63,10 +52,14 @@ required: false default: false type: bool -author: Mike Mochan (@mmochan) +notes: + - Support for I(purge_tags) was added in release 2.0.0. +author: + - Mike Mochan (@mmochan) extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = ''' @@ -547,7 +540,7 @@ def main(): peer_region=dict(), peering_id=dict(), peer_owner_id=dict(), - tags=dict(required=False, type='dict'), + tags=dict(required=False, type='dict', aliases=['resource_tags']), purge_tags=dict(default=True, type='bool'), state=dict(default='present', choices=['present', 'absent', 'accept', 'reject']), wait=dict(default=False, type='bool'), diff --git a/plugins/modules/elb_application_lb.py b/plugins/modules/elb_application_lb.py index a7c75c00cd3..2e84242d382 100644 --- a/plugins/modules/elb_application_lb.py +++ b/plugins/modules/elb_application_lb.py @@ -24,8 +24,9 @@ version_added: 1.0.0 short_description: Manage an Application Load Balancer description: - - Manage an AWS Application Elastic Load Balancer. See U(https://aws.amazon.com/blogs/aws/new-aws-application-load-balancer/) for details. -author: "Rob White (@wimnat)" + - Manage an AWS Application Elastic Load Balancer. See U(https://aws.amazon.com/blogs/aws/new-aws-application-load-balancer/) for details. +author: + - "Rob White (@wimnat)" options: access_logs_enabled: description: @@ -154,12 +155,6 @@ - If the I(listeners) parameter is not set then listeners will not be modified. default: yes type: bool - purge_tags: - description: - - If yes, existing tags will be purged from the resource to match exactly what is defined by I(tags) parameter. - - If the I(tags) parameter is not set then tags will not be modified. - default: yes - type: bool subnets: description: - A list of the IDs of the subnets to attach to the load balancer. You can specify only one subnet per Availability Zone. You must specify subnets from @@ -186,10 +181,6 @@ default: present choices: [ 'present', 'absent' ] type: str - tags: - description: - - A dictionary of one or more tags to assign to the load balancer. - type: dict wait: description: - Wait for the load balancer to have a state of 'active' before completing. A status check is @@ -217,8 +208,9 @@ type: bool version_added: 3.2.0 extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags notes: - Listeners are matched based on port. If a listener's port is changed then a new listener will be created. @@ -771,7 +763,7 @@ def main(): security_groups=dict(type='list', elements='str'), scheme=dict(default='internet-facing', choices=['internet-facing', 'internal']), state=dict(choices=['present', 'absent'], default='present'), - tags=dict(type='dict'), + tags=dict(type='dict', aliases=['resource_tags']), waf_fail_open=dict(type='bool'), wait_timeout=dict(type='int'), wait=dict(default=False, type='bool'), diff --git a/plugins/modules/elb_network_lb.py b/plugins/modules/elb_network_lb.py index 768900832c5..00b8f466f8a 100644 --- a/plugins/modules/elb_network_lb.py +++ b/plugins/modules/elb_network_lb.py @@ -13,9 +13,10 @@ version_added: 1.0.0 short_description: Manage a Network Load Balancer description: - - Manage an AWS Network Elastic Load Balancer. See - U(https://aws.amazon.com/blogs/aws/new-network-load-balancer-effortless-scaling-to-millions-of-requests-per-second/) for details. -author: "Rob White (@wimnat)" + - Manage an AWS Network Elastic Load Balancer. See + U(https://aws.amazon.com/blogs/aws/new-network-load-balancer-effortless-scaling-to-millions-of-requests-per-second/) for details. +author: + - "Rob White (@wimnat)" options: cross_zone_load_balancing: description: @@ -77,12 +78,6 @@ - If the I(listeners) parameter is not set then listeners will not be modified. default: true type: bool - purge_tags: - description: - - If I(purge_tags=true), existing tags will be purged from the resource to match exactly what is defined by I(tags) parameter. - - If the I(tags) parameter is not set then tags will not be modified. - default: true - type: bool subnet_mappings: description: - A list of dicts containing the IDs of the subnets to attach to the load balancer. You can also specify the allocation ID of an Elastic IP @@ -112,10 +107,6 @@ choices: [ 'present', 'absent' ] type: str default: 'present' - tags: - description: - - A dictionary of one or more tags to assign to the load balancer. - type: dict wait: description: - Whether or not to wait for the network load balancer to reach the desired state. @@ -130,9 +121,9 @@ choices: [ 'ipv4', 'dualstack' ] type: str extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags notes: - Listeners are matched based on port. If a listener's port is changed then a new listener will be created. - Listener rules are matched based on priority. If a rule's priority is changed then a new rule will be created. @@ -448,7 +439,7 @@ def main(): subnet_mappings=dict(type='list', elements='dict'), scheme=dict(default='internet-facing', choices=['internet-facing', 'internal']), state=dict(choices=['present', 'absent'], type='str', default='present'), - tags=dict(type='dict'), + tags=dict(type='dict', aliases=['resource_tags']), wait_timeout=dict(type='int'), wait=dict(type='bool'), ip_address_type=dict(type='str', choices=['ipv4', 'dualstack']) diff --git a/plugins/modules/iam_role.py b/plugins/modules/iam_role.py index 814dbbb8b99..76cd04950d3 100644 --- a/plugins/modules/iam_role.py +++ b/plugins/modules/iam_role.py @@ -12,7 +12,8 @@ short_description: Manage AWS IAM roles description: - Manage AWS IAM roles. -author: "Rob White (@wimnat)" +author: + - "Rob White (@wimnat)" options: path: description: @@ -78,15 +79,6 @@ - Only applies when I(state=absent). default: false type: bool - tags: - description: - - Tag dict to apply to the queue. - type: dict - purge_tags: - description: - - Remove tags not listed in I(tags) when tags is specified. - default: true - type: bool wait_timeout: description: - How long (in seconds) to wait for creation / update to complete. @@ -99,9 +91,9 @@ default: True type: bool extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = r''' @@ -673,7 +665,7 @@ def main(): create_instance_profile=dict(type='bool', default=True), delete_instance_profile=dict(type='bool', default=False), purge_policies=dict(type='bool', aliases=['purge_policy', 'purge_managed_policies']), - tags=dict(type='dict'), + tags=dict(type='dict', aliases=['resource_tags']), purge_tags=dict(type='bool', default=True), wait=dict(type='bool', default=True), wait_timeout=dict(default=120, type='int'), diff --git a/plugins/modules/iam_user.py b/plugins/modules/iam_user.py index c5e7160f98b..b6b3ce34873 100644 --- a/plugins/modules/iam_user.py +++ b/plugins/modules/iam_user.py @@ -70,18 +70,6 @@ default: false type: bool aliases: ['purge_policy', 'purge_managed_policies'] - tags: - description: - - Tag dict to apply to the user. - required: false - type: dict - version_added: 2.1.0 - purge_tags: - description: - - Remove tags not listed in I(tags) when tags is specified. - default: true - type: bool - version_added: 2.1.0 wait: description: - When I(wait=True) the module will wait for up to I(wait_timeout) seconds @@ -95,10 +83,12 @@ default: 120 type: int version_added: 2.2.0 +notes: + - Support for I(tags) and I(purge_tags) was added in release 2.1.0. extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = r''' @@ -552,7 +542,7 @@ def main(): managed_policies=dict(default=[], type='list', aliases=['managed_policy'], elements='str'), state=dict(choices=['present', 'absent'], required=True), purge_policies=dict(default=False, type='bool', aliases=['purge_policy', 'purge_managed_policies']), - tags=dict(type='dict'), + tags=dict(type='dict', aliases=['resource_tags']), purge_tags=dict(type='bool', default=True), wait=dict(type='bool', default=True), wait_timeout=dict(default=120, type='int'), diff --git a/plugins/modules/networkfirewall_policy.py b/plugins/modules/networkfirewall_policy.py index 5672a83501c..18a5565129b 100644 --- a/plugins/modules/networkfirewall_policy.py +++ b/plugins/modules/networkfirewall_policy.py @@ -124,22 +124,6 @@ required: false default: True aliases: ['purge_custom_stateless_actions'] - tags: - description: - - A dictionary representing the tags associated with the policy. - - 'For example C({"Example Tag": "some example value"})' - - Unless I(purge_tags=False) all other tags will be removed from the - policy. - type: dict - required: false - purge_tags: - description: - - If I(purge_tags=true) and I(tags) is defined existing tags will be - purged from the resource to match exactly what is defined by the - I(tags) parameter. - type: bool - required: false - default: True wait: description: - Whether to wait for the firewall policy to reach the @@ -156,10 +140,12 @@ required: false -author: Mark Chappell (@tremble) +author: + - Mark Chappell (@tremble) extends_documentation_fragment: - amazon.aws.aws - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = ''' @@ -371,7 +357,7 @@ def main(): arn=dict(type='str', required=False), state=dict(type='str', required=False, default='present', choices=['present', 'absent']), description=dict(type='str', required=False), - tags=dict(type='dict', required=False), + tags=dict(type='dict', required=False, aliases=['resource_tags']), purge_tags=dict(type='bool', required=False, default=True), stateful_rule_groups=dict(type='list', elements='str', required=False, aliases=['stateful_groups']), stateless_rule_groups=dict(type='list', elements='str', required=False, aliases=['stateless_groups']), diff --git a/plugins/modules/networkfirewall_rule_group.py b/plugins/modules/networkfirewall_rule_group.py index a0898b30884..fef080bcd3c 100644 --- a/plugins/modules/networkfirewall_rule_group.py +++ b/plugins/modules/networkfirewall_rule_group.py @@ -248,20 +248,6 @@ U(https://suricata.readthedocs.io/en/suricata-6.0.0/rules/intro.html). type: dict required: false - tags: - description: - - A dictionary representing the tags associated with the rule group. - - 'For example C({"Example Tag": "some example value"})' - - Unless I(purge_tags=False) all other tags will be removed from the rule - group. - type: dict - required: false - purge_tags: - description: - - If I(purge_tags=true), existing tags will be purged from the resource to match exactly what is defined by I(tags) parameter. - type: bool - required: false - default: True wait: description: - Whether to wait for the firewall rule group to reach the @@ -278,10 +264,12 @@ required: false -author: Mark Chappell (@tremble) +author: + - Mark Chappell (@tremble) extends_documentation_fragment: - amazon.aws.aws - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = ''' @@ -764,7 +752,7 @@ def main(): rule_strings=dict(type='list', elements='str', required=False), domain_list=dict(type='dict', options=domain_list_spec, required=False), rule_list=dict(type='list', elements='dict', aliases=['stateful_rule_list'], options=rule_list_spec, required=False), - tags=dict(type='dict', required=False), + tags=dict(type='dict', required=False, aliases=['resource_tags']), purge_tags=dict(type='bool', required=False, default=True), wait=dict(type='bool', required=False, default=True), wait_timeout=dict(type='int', required=False), diff --git a/plugins/modules/rds_cluster.py b/plugins/modules/rds_cluster.py index 1d2ed3fdd9b..68e0ef17fc9 100644 --- a/plugins/modules/rds_cluster.py +++ b/plugins/modules/rds_cluster.py @@ -15,8 +15,9 @@ description: - Create, modify, and delete RDS clusters. extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags author: - Sloane Hertel (@s-hertel) - Alina Buzachis (@alinabuzachis) @@ -47,12 +48,6 @@ Set I(enable_cloudwatch_logs_exports) to an empty list to disable all. type: bool default: true - purge_tags: - description: - - Whether or not to remove tags assigned to the DB cluster if not specified in the playbook. To remove all tags - set I(tags) to an empty dictionary in conjunction with this. - type: bool - default: true purge_security_groups: description: - Set to C(false) to retain any enabled security groups that aren't specified in the task and are associated with the cluster. @@ -322,10 +317,6 @@ description: - Whether the DB cluster is encrypted. type: bool - tags: - description: - - A dictionary of key value pairs to assign the DB cluster. - type: dict use_earliest_time_on_point_in_time_unavailable: description: - If I(backtrack_to) is set to a timestamp earlier than the earliest backtrack time, this value backtracks the DB cluster to @@ -951,7 +942,7 @@ def main(): source_engine_version=dict(), source_region=dict(), storage_encrypted=dict(type='bool'), - tags=dict(type='dict'), + tags=dict(type='dict', aliases=['resource_tags']), use_earliest_time_on_point_in_time_unavailable=dict(type='bool'), use_latest_restorable_time=dict(type='bool'), vpc_security_group_ids=dict(type='list', elements='str'), diff --git a/plugins/modules/rds_instance.py b/plugins/modules/rds_instance.py index 083042d7d91..f5e3aca4bbc 100644 --- a/plugins/modules/rds_instance.py +++ b/plugins/modules/rds_instance.py @@ -14,9 +14,9 @@ description: - Create, modify, and delete RDS instances. extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags author: - Sloane Hertel (@s-hertel) @@ -46,10 +46,6 @@ description: Set to False to retain any enabled cloudwatch logs that aren't specified in the task and are associated with the instance. type: bool default: True - purge_tags: - description: Set to False to retain any tags that aren't specified in task and are associated with the instance. - type: bool - default: True read_replica: description: - Set to C(False) to promote a read replica instance or true to create one. When creating a read replica C(creation_source) should @@ -407,10 +403,6 @@ - gp2 - io1 type: str - tags: - description: - - A dictionary of key value pairs to assign the DB instance. - type: dict tde_credential_arn: description: - The ARN from the key store with which to associate the instance for Transparent Data Encryption. This is @@ -1321,7 +1313,7 @@ def main(): source_region=dict(), storage_encrypted=dict(type='bool'), storage_type=dict(choices=['standard', 'gp2', 'io1']), - tags=dict(type='dict'), + tags=dict(type='dict', aliases=['resource_tags']), tde_credential_arn=dict(aliases=['transparent_data_encryption_arn']), tde_credential_password=dict(no_log=True, aliases=['transparent_data_encryption_password']), timezone=dict(), diff --git a/plugins/modules/rds_option_group.py b/plugins/modules/rds_option_group.py index d4ed9e6ac65..1efc80cf55f 100644 --- a/plugins/modules/rds_option_group.py +++ b/plugins/modules/rds_option_group.py @@ -8,7 +8,7 @@ DOCUMENTATION = r''' module: rds_option_group -short_description: rds_option_group module +short_description: Manages the creation, modification, deletion of RDS option groups version_added: 2.1.0 description: - Manages the creation, modification, deletion of RDS option groups. @@ -118,23 +118,14 @@ required: false type: list elements: str - tags: - description: - - A dictionary of key value pairs to assign the option group. - - To remove all tags set I(tags={}) and I(purge_tags=true). - type: dict - purge_tags: - description: - - Remove tags not listed in I(tags). - type: bool - default: true wait: description: Whether to wait for the cluster to be available or deleted. type: bool default: True extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = r''' @@ -644,7 +635,7 @@ def main(): options=dict(required=False, type='list', elements='dict'), apply_immediately=dict(type='bool', default=False), state=dict(required=True, choices=['present', 'absent']), - tags=dict(required=False, type='dict'), + tags=dict(required=False, type='dict', aliases=['resource_tags']), purge_tags=dict(type='bool', default=True), wait=dict(type='bool', default=True), ) diff --git a/plugins/modules/rds_subnet_group.py b/plugins/modules/rds_subnet_group.py index b0a9f8ae806..3ce90a5d863 100644 --- a/plugins/modules/rds_subnet_group.py +++ b/plugins/modules/rds_subnet_group.py @@ -15,7 +15,7 @@ version_added: 1.0.0 short_description: manage RDS database subnet groups description: - - Creates, modifies, and deletes RDS database subnet groups. + - Creates, modifies, and deletes RDS database subnet groups. options: state: description: @@ -39,24 +39,15 @@ - Required when I(state=present). type: list elements: str - tags: - description: - - A hash/dictionary of tags to add to the new RDS subnet group or to add/remove from an existing one. - type: dict - version_added: 3.2.0 - purge_tags: - description: - - Whether or not to remove tags assigned to the RDS subnet group if not specified in the playbook. - - To remove all tags set I(tags) to an empty dictionary in conjunction with this. - default: True - type: bool - version_added: 3.2.0 +notes: + - Support for I(tags) and I(purge_tags) was added in release 3.2.0. author: - - "Scott Anderson (@tastychutney)" - - "Alina Buzachis (@alinabuzachis)" + - "Scott Anderson (@tastychutney)" + - "Alina Buzachis (@alinabuzachis)" extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags ''' @@ -265,7 +256,7 @@ def main(): name=dict(required=True), description=dict(required=False), subnets=dict(required=False, type='list', elements='str'), - tags=dict(required=False, type='dict'), + tags=dict(required=False, type='dict', aliases=['resource_tags']), purge_tags=dict(type='bool', default=True), ) required_if = [('state', 'present', ['description', 'subnets'])] diff --git a/plugins/modules/redshift.py b/plugins/modules/redshift.py index 41482c682b7..ca3e1a45052 100644 --- a/plugins/modules/redshift.py +++ b/plugins/modules/redshift.py @@ -167,21 +167,12 @@ - Whether the cluster should have enhanced VPC routing enabled. default: false type: bool - tags: - description: - - A dictionary of resource tags. - type: dict - aliases: ['resource_tags'] - version_added: "1.3.0" - purge_tags: - description: - - Purge existing tags that are not found in the cluster - type: bool - default: 'yes' - version_added: "1.3.0" +notes: + - Support for I(tags) and I(purge_tags) was added in release 1.3.0. extends_documentation_fragment: - amazon.aws.aws - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = r'''