From c9ea19ff7ba5b9af83c408302f429635a8a64082 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Mon, 30 May 2022 20:03:33 +0200 Subject: [PATCH 1/2] Tagging fragment - Move simplest cases over to the docs fragment. --- changelogs/fragments/1182-tagging.yml | 18 +++++++++ plugins/modules/aws_glue_job.py | 25 ++++-------- plugins/modules/aws_msk_cluster.py | 12 ++---- plugins/modules/aws_secret.py | 30 +++++--------- .../aws_step_functions_state_machine.py | 30 ++++---------- plugins/modules/dynamodb_table.py | 21 +++------- plugins/modules/ec2_eip.py | 39 ++++++++----------- .../ec2_transit_gateway_vpc_attachment.py | 22 ++--------- plugins/modules/ec2_vpc_peer.py | 23 ++++------- plugins/modules/elb_application_lb.py | 22 ++++------- plugins/modules/elb_network_lb.py | 25 ++++-------- plugins/modules/iam_role.py | 20 +++------- plugins/modules/iam_user.py | 22 +++-------- plugins/modules/networkfirewall.py | 22 ++--------- plugins/modules/networkfirewall_policy.py | 22 ++--------- plugins/modules/networkfirewall_rule_group.py | 20 ++-------- plugins/modules/rds_cluster.py | 17 ++------ plugins/modules/rds_instance.py | 16 ++------ plugins/modules/rds_instance_snapshot.py | 27 +++++-------- plugins/modules/rds_option_group.py | 19 +++------ plugins/modules/rds_subnet_group.py | 27 +++++-------- plugins/modules/redshift.py | 15 ++----- 22 files changed, 153 insertions(+), 341 deletions(-) create mode 100644 changelogs/fragments/1182-tagging.yml diff --git a/changelogs/fragments/1182-tagging.yml b/changelogs/fragments/1182-tagging.yml new file mode 100644 index 00000000000..8544bde6383 --- /dev/null +++ b/changelogs/fragments/1182-tagging.yml @@ -0,0 +1,18 @@ +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). +- dynamodb_table - ``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_instance_snapshot - ``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/dynamodb_table.py b/plugins/modules/dynamodb_table.py index c1d9b65686e..943cdea02b1 100644 --- a/plugins/modules/dynamodb_table.py +++ b/plugins/modules/dynamodb_table.py @@ -15,7 +15,8 @@ - Create or delete AWS Dynamo DB tables. - Can update the provisioned throughput on existing tables. - Returns the status of the specified table. -author: Alan Loi (@loia) +author: + - Alan Loi (@loia) options: state: description: @@ -128,16 +129,6 @@ choices: ['STANDARD', 'STANDARD_INFREQUENT_ACCESS'] type: str version_added: 3.1.0 - tags: - description: - - A hash/dictionary of tags to add to the new instance or for starting/stopping instance by tag. - - 'For example: C({"key":"value"}) or C({"key":"value","key2":"value2"})' - type: dict - purge_tags: - description: - - Remove tags not listed in I(tags). - default: True - type: bool wait_timeout: description: - How long (in seconds) to wait for creation / update / deletion to complete. @@ -151,9 +142,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''' @@ -1042,7 +1033,7 @@ def main(): write_capacity=dict(type='int'), indexes=dict(default=[], type='list', elements='dict', options=index_options), table_class=dict(type='str', choices=['STANDARD', 'STANDARD_INFREQUENT_ACCESS']), - 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=300, type='int', aliases=['wait_for_active_timeout']), 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.py b/plugins/modules/networkfirewall.py index fefb565fef5..9e9b02d0edc 100644 --- a/plugins/modules/networkfirewall.py +++ b/plugins/modules/networkfirewall.py @@ -40,14 +40,6 @@ - A description for the firewall. required: false type: str - tags: - description: - - A dictionary representing the tags associated with the firewall. - - 'For example C({"Example Tag": "some example value"})' - - Unless I(purge_tags=False) all other tags will be removed from the - firewall. - type: dict - required: false delete_protection: description: - When I(delete_protection=True), the firewall is protected from deletion. @@ -69,14 +61,6 @@ - Defaults to C(false) when not provided on creation. type: bool 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: - On creation, whether to wait for the firewall to reach the C(READY) @@ -117,10 +101,12 @@ required: false aliases: ['firewall_policy_arn'] -author: Mark Chappell (@tremble) +author: + - Mark Chappell (@tremble) extends_documentation_fragment: - amazon.aws.aws - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = ''' @@ -296,7 +282,7 @@ def main(): arn=dict(type='str', required=False, aliases=['firewall_arn']), 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), wait=dict(type='bool', required=False, default=True), wait_timeout=dict(type='int', required=False), 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_instance_snapshot.py b/plugins/modules/rds_instance_snapshot.py index 0d7a50a06e7..fc32ef75e4c 100644 --- a/plugins/modules/rds_instance_snapshot.py +++ b/plugins/modules/rds_instance_snapshot.py @@ -14,7 +14,7 @@ version_added: 1.0.0 short_description: Manage Amazon RDS instance snapshots description: - - Creates or deletes RDS snapshots. + - Creates or deletes RDS snapshots. options: state: description: @@ -68,24 +68,15 @@ - how long before wait gives up, in seconds. default: 300 type: int - tags: - description: - - tags dict to apply to a snapshot. - type: dict - purge_tags: - description: - - whether to remove tags not present in the I(tags) parameter. - default: True - type: bool author: - - "Will Thames (@willthames)" - - "Michael De La Rue (@mikedlr)" - - "Alina Buzachis (@alinabuzachis)" - - "Joseph Torcasso (@jatorcasso)" + - "Will Thames (@willthames)" + - "Michael De La Rue (@mikedlr)" + - "Alina Buzachis (@alinabuzachis)" + - "Joseph Torcasso (@jatorcasso)" extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = r''' @@ -359,7 +350,7 @@ def main(): source_db_snapshot_identifier=dict(aliases=['source_id', 'source_snapshot_id']), wait=dict(type='bool', default=False), wait_timeout=dict(type='int', default=300), - tags=dict(type='dict'), + tags=dict(type='dict', aliases=['resource_tags']), purge_tags=dict(type='bool', default=True), copy_tags=dict(type='bool', default=False), source_region=dict(type='str'), 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''' From c39debcdd0f97f4198a4db635954d1133066e2b5 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 1 Jun 2022 11:59:09 +0200 Subject: [PATCH 2/2] Remove some of the slow tests to split them off and fix timeouts --- changelogs/fragments/1182-tagging.yml | 2 -- plugins/modules/dynamodb_table.py | 21 ++++++++++++------ plugins/modules/networkfirewall.py | 22 +++++++++++++++---- plugins/modules/rds_instance_snapshot.py | 27 ++++++++++++++++-------- 4 files changed, 51 insertions(+), 21 deletions(-) diff --git a/changelogs/fragments/1182-tagging.yml b/changelogs/fragments/1182-tagging.yml index 8544bde6383..1dec486ae34 100644 --- a/changelogs/fragments/1182-tagging.yml +++ b/changelogs/fragments/1182-tagging.yml @@ -3,7 +3,6 @@ minor_changes: - 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). -- dynamodb_table - ``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). @@ -12,7 +11,6 @@ minor_changes: - 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_instance_snapshot - ``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/dynamodb_table.py b/plugins/modules/dynamodb_table.py index 943cdea02b1..c1d9b65686e 100644 --- a/plugins/modules/dynamodb_table.py +++ b/plugins/modules/dynamodb_table.py @@ -15,8 +15,7 @@ - Create or delete AWS Dynamo DB tables. - Can update the provisioned throughput on existing tables. - Returns the status of the specified table. -author: - - Alan Loi (@loia) +author: Alan Loi (@loia) options: state: description: @@ -129,6 +128,16 @@ choices: ['STANDARD', 'STANDARD_INFREQUENT_ACCESS'] type: str version_added: 3.1.0 + tags: + description: + - A hash/dictionary of tags to add to the new instance or for starting/stopping instance by tag. + - 'For example: C({"key":"value"}) or C({"key":"value","key2":"value2"})' + type: dict + purge_tags: + description: + - Remove tags not listed in I(tags). + default: True + type: bool wait_timeout: description: - How long (in seconds) to wait for creation / update / deletion to complete. @@ -142,9 +151,9 @@ default: True type: bool extends_documentation_fragment: - - amazon.aws.aws - - amazon.aws.ec2 - - amazon.aws.tags +- amazon.aws.aws +- amazon.aws.ec2 + ''' EXAMPLES = r''' @@ -1033,7 +1042,7 @@ def main(): write_capacity=dict(type='int'), indexes=dict(default=[], type='list', elements='dict', options=index_options), table_class=dict(type='str', choices=['STANDARD', 'STANDARD_INFREQUENT_ACCESS']), - tags=dict(type='dict', aliases=['resource_tags']), + tags=dict(type='dict'), purge_tags=dict(type='bool', default=True), wait=dict(type='bool', default=True), wait_timeout=dict(default=300, type='int', aliases=['wait_for_active_timeout']), diff --git a/plugins/modules/networkfirewall.py b/plugins/modules/networkfirewall.py index 9e9b02d0edc..fefb565fef5 100644 --- a/plugins/modules/networkfirewall.py +++ b/plugins/modules/networkfirewall.py @@ -40,6 +40,14 @@ - A description for the firewall. required: false type: str + tags: + description: + - A dictionary representing the tags associated with the firewall. + - 'For example C({"Example Tag": "some example value"})' + - Unless I(purge_tags=False) all other tags will be removed from the + firewall. + type: dict + required: false delete_protection: description: - When I(delete_protection=True), the firewall is protected from deletion. @@ -61,6 +69,14 @@ - Defaults to C(false) when not provided on creation. type: bool 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: - On creation, whether to wait for the firewall to reach the C(READY) @@ -101,12 +117,10 @@ required: false aliases: ['firewall_policy_arn'] -author: - - Mark Chappell (@tremble) +author: Mark Chappell (@tremble) extends_documentation_fragment: - amazon.aws.aws - amazon.aws.ec2 - - amazon.aws.tags ''' EXAMPLES = ''' @@ -282,7 +296,7 @@ def main(): arn=dict(type='str', required=False, aliases=['firewall_arn']), state=dict(type='str', required=False, default='present', choices=['present', 'absent']), description=dict(type='str', required=False), - tags=dict(type='dict', required=False, aliases=['resource_tags']), + tags=dict(type='dict', required=False), 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_instance_snapshot.py b/plugins/modules/rds_instance_snapshot.py index fc32ef75e4c..0d7a50a06e7 100644 --- a/plugins/modules/rds_instance_snapshot.py +++ b/plugins/modules/rds_instance_snapshot.py @@ -14,7 +14,7 @@ version_added: 1.0.0 short_description: Manage Amazon RDS instance snapshots description: - - Creates or deletes RDS snapshots. + - Creates or deletes RDS snapshots. options: state: description: @@ -68,15 +68,24 @@ - how long before wait gives up, in seconds. default: 300 type: int + tags: + description: + - tags dict to apply to a snapshot. + type: dict + purge_tags: + description: + - whether to remove tags not present in the I(tags) parameter. + default: True + type: bool author: - - "Will Thames (@willthames)" - - "Michael De La Rue (@mikedlr)" - - "Alina Buzachis (@alinabuzachis)" - - "Joseph Torcasso (@jatorcasso)" + - "Will Thames (@willthames)" + - "Michael De La Rue (@mikedlr)" + - "Alina Buzachis (@alinabuzachis)" + - "Joseph Torcasso (@jatorcasso)" extends_documentation_fragment: - - amazon.aws.aws - - amazon.aws.ec2 - - amazon.aws.tags +- amazon.aws.aws +- amazon.aws.ec2 + ''' EXAMPLES = r''' @@ -350,7 +359,7 @@ def main(): source_db_snapshot_identifier=dict(aliases=['source_id', 'source_snapshot_id']), wait=dict(type='bool', default=False), wait_timeout=dict(type='int', default=300), - tags=dict(type='dict', aliases=['resource_tags']), + tags=dict(type='dict'), purge_tags=dict(type='bool', default=True), copy_tags=dict(type='bool', default=False), source_region=dict(type='str'),