From 23fe103902f71a3810f2f59bcd7487ce987fb6f6 Mon Sep 17 00:00:00 2001 From: Carlos Schimidt Date: Thu, 28 Mar 2024 06:58:33 -0300 Subject: [PATCH 01/26] Add support for multicast option on transit gateway --- plugins/module_utils/transitgateway.py | 3 +++ plugins/modules/ec2_transit_gateway.py | 13 +++++++++++++ plugins/modules/ec2_transit_gateway_info.py | 6 ++++++ 3 files changed, 22 insertions(+) diff --git a/plugins/module_utils/transitgateway.py b/plugins/module_utils/transitgateway.py index 5f0e934d1f2..7ce93b8e177 100644 --- a/plugins/module_utils/transitgateway.py +++ b/plugins/module_utils/transitgateway.py @@ -191,6 +191,9 @@ def _set_option(self, name, value): def set_dns_support(self, value): return self._set_option("DnsSupport", value) + + def set_multicast_support(self, value): + return self._set_option("MulticastSupport", value) def set_ipv6_support(self, value): return self._set_option("Ipv6Support", value) diff --git a/plugins/modules/ec2_transit_gateway.py b/plugins/modules/ec2_transit_gateway.py index 19876984dba..8489f7d9e07 100644 --- a/plugins/modules/ec2_transit_gateway.py +++ b/plugins/modules/ec2_transit_gateway.py @@ -42,6 +42,11 @@ - Whether to enable AWS DNS support. default: true type: bool + multicast_support: + description: + - Whether to enable AWS Multicast support. + default: true + type: bool state: description: - C(present) to ensure resource is created. @@ -91,6 +96,7 @@ asn: 64514 auto_associate: false auto_propagate: false + multicast_support: true dns_support: true description: "nonprod transit gateway" purge_tags: false @@ -181,6 +187,11 @@ returned: always type: str sample: enable + multicast_support: + description: Indicates whether Multicast support is enabled. + returned: always + type: str + sample: enable owner_id: description: The account that owns the transit gateway. returned: always @@ -362,6 +373,7 @@ def create_tgw(self, description): options["DefaultRouteTablePropagation"] = self.enable_option_flag(self._module.params.get("auto_propagate")) options["VpnEcmpSupport"] = self.enable_option_flag(self._module.params.get("vpn_ecmp_support")) options["DnsSupport"] = self.enable_option_flag(self._module.params.get("dns_support")) + options["MulticastSupport"] = self.enable_option_flag(self._module.params.get("multicast_support")) try: response = self._connection.create_transit_gateway(Description=description, Options=options) @@ -482,6 +494,7 @@ def setup_module_object(): auto_attach=dict(type="bool", default=False), auto_propagate=dict(type="bool", default=True), description=dict(type="str"), + multicast_support=dict(type="bool", default=True), dns_support=dict(type="bool", default=True), purge_tags=dict(type="bool", default=True), state=dict(default="present", choices=["present", "absent"]), diff --git a/plugins/modules/ec2_transit_gateway_info.py b/plugins/modules/ec2_transit_gateway_info.py index b25346b84b8..6e87da5c444 100644 --- a/plugins/modules/ec2_transit_gateway_info.py +++ b/plugins/modules/ec2_transit_gateway_info.py @@ -119,6 +119,12 @@ returned: always type: str sample: "enable" + multicast_support: + description: + - Indicates whether Multicast support is enabled. + returned: always + type: str + sample: "enable" propagation_default_route_table_id: description: - The ID of the default propagation route table. From 1887e2a7aef621026c41ba58eec1f7ce6d63a22f Mon Sep 17 00:00:00 2001 From: Carlos Schimidt Date: Thu, 28 Mar 2024 07:19:38 -0300 Subject: [PATCH 02/26] Add support for Multicast option on Transit Gateway --- plugins/module_utils/transitgateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/module_utils/transitgateway.py b/plugins/module_utils/transitgateway.py index 7ce93b8e177..3069e0ed9a2 100644 --- a/plugins/module_utils/transitgateway.py +++ b/plugins/module_utils/transitgateway.py @@ -193,7 +193,7 @@ def set_dns_support(self, value): return self._set_option("DnsSupport", value) def set_multicast_support(self, value): - return self._set_option("MulticastSupport", value) + return self._set_option("MulticastSupport", value) def set_ipv6_support(self, value): return self._set_option("Ipv6Support", value) From e01eb5a79459fadb5209a51a73cb1888f6be444c Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 28 Mar 2024 09:11:05 -0300 Subject: [PATCH 03/26] Add info about multicast support for transit gateway --- CHANGELOG.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d2ed998bf35..5a07a600a97 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,18 @@ community.aws Release Notes .. contents:: Topics +v7.2.0 +====== + +Release Summary +--------------- + +This release includes new feature for the ``transit_gateway`` module. + +Minor Changes +------------- + +- transit_gateway - added support for ``multicast_support`` to be able to create a transit gateway with multicast enable. v7.1.0 ====== From 114639f53bfc440b88e2d5a649575a219852df12 Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Tue, 2 Apr 2024 08:54:05 -0300 Subject: [PATCH 04/26] Update ec2_transit_gateway_info.py Correction on doc section for multicast option --- plugins/modules/ec2_transit_gateway_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/ec2_transit_gateway_info.py b/plugins/modules/ec2_transit_gateway_info.py index 6e87da5c444..417e0e13760 100644 --- a/plugins/modules/ec2_transit_gateway_info.py +++ b/plugins/modules/ec2_transit_gateway_info.py @@ -119,7 +119,7 @@ returned: always type: str sample: "enable" - multicast_support: + multicast_support: description: - Indicates whether Multicast support is enabled. returned: always From af489f8533d9a49f5fb8196789292c685df7c592 Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Tue, 2 Apr 2024 09:06:40 -0300 Subject: [PATCH 05/26] Update ec2_transit_gateway_info.py --- plugins/modules/ec2_transit_gateway_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/ec2_transit_gateway_info.py b/plugins/modules/ec2_transit_gateway_info.py index 417e0e13760..40ff94650ab 100644 --- a/plugins/modules/ec2_transit_gateway_info.py +++ b/plugins/modules/ec2_transit_gateway_info.py @@ -6,7 +6,7 @@ DOCUMENTATION = r""" module: ec2_transit_gateway_info -short_description: Gather information about ec2 transit gateways in AWS +short_description: Gather information about ec2 transit gateways in AWS version_added: 1.0.0 description: - Gather information about ec2 transit gateways in AWS From b207886ba151e29c9d3b5e94840e22636432ee7d Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 09:43:39 -0300 Subject: [PATCH 06/26] Create 2063-add-multicast-support.yml --- changelogs/fragments/2063-add-multicast-support.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/2063-add-multicast-support.yml diff --git a/changelogs/fragments/2063-add-multicast-support.yml b/changelogs/fragments/2063-add-multicast-support.yml new file mode 100644 index 00000000000..ed6ec1e9eb3 --- /dev/null +++ b/changelogs/fragments/2063-add-multicast-support.yml @@ -0,0 +1,2 @@ +minor_changes: + - ec2_transit_gateway - Support for enable multicast on Transit Gateway (https://github.com/ansible-collections/community.aws/pull/2063). From 4025c20e3bd7f1ededb4a6c7f9fc3824ca9c9bfa Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 10:07:07 -0300 Subject: [PATCH 07/26] Added version_added: 7.3.0 to ec2_transit_gateway.py --- plugins/modules/ec2_transit_gateway.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/modules/ec2_transit_gateway.py b/plugins/modules/ec2_transit_gateway.py index 8489f7d9e07..5d00e2d973f 100644 --- a/plugins/modules/ec2_transit_gateway.py +++ b/plugins/modules/ec2_transit_gateway.py @@ -47,6 +47,7 @@ - Whether to enable AWS Multicast support. default: true type: bool + version_added: 7.3.0 state: description: - C(present) to ensure resource is created. @@ -192,6 +193,7 @@ returned: always type: str sample: enable + version_added: 7.3.0 owner_id: description: The account that owns the transit gateway. returned: always From 00b94baf6e0f2543f81e54ba8b9db443be187820 Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 10:07:59 -0300 Subject: [PATCH 08/26] Added version_added: 7.3.0 to ec2_transit_gateway_info.py --- plugins/modules/ec2_transit_gateway_info.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/modules/ec2_transit_gateway_info.py b/plugins/modules/ec2_transit_gateway_info.py index 40ff94650ab..44585645d78 100644 --- a/plugins/modules/ec2_transit_gateway_info.py +++ b/plugins/modules/ec2_transit_gateway_info.py @@ -125,6 +125,7 @@ returned: always type: str sample: "enable" + version_added: 7.3.0 propagation_default_route_table_id: description: - The ID of the default propagation route table. From 9dca7b1925990d38cb0cadf1eaab5d122825d5fe Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 10:27:58 -0300 Subject: [PATCH 09/26] Added options.multicast-support: enable to teste with multiple filters --- tests/integration/targets/ec2_transit_gateway/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml index c7353cfc0a6..0843e50f194 100644 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -123,6 +123,7 @@ filters: options.dns-support: enable options.vpn-ecmp-support: enable + options.multicast-support: enable register: result - name: assert success with transit_gateway_id filter assert: From 19abc5b3717c643f89c3873edcafa7a50940490f Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 10:30:02 -0300 Subject: [PATCH 10/26] Removed incorrectly inserted text on CHANGELOG.rst --- CHANGELOG.rst | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5a07a600a97..2a6b622b2fa 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,19 +4,6 @@ community.aws Release Notes .. contents:: Topics -v7.2.0 -====== - -Release Summary ---------------- - -This release includes new feature for the ``transit_gateway`` module. - -Minor Changes -------------- - -- transit_gateway - added support for ``multicast_support`` to be able to create a transit gateway with multicast enable. - v7.1.0 ====== From 00a10090f0f2a30a2026397bc5506976697ab4ce Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 11:11:41 -0300 Subject: [PATCH 11/26] changed default to false for multicast support --- plugins/modules/ec2_transit_gateway.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/ec2_transit_gateway.py b/plugins/modules/ec2_transit_gateway.py index 5d00e2d973f..cbc944053fb 100644 --- a/plugins/modules/ec2_transit_gateway.py +++ b/plugins/modules/ec2_transit_gateway.py @@ -44,8 +44,8 @@ type: bool multicast_support: description: - - Whether to enable AWS Multicast support. - default: true + - Whether to enable AWS Multicast support. Valid only at the time of creation of the Transit Gateway. + default: false type: bool version_added: 7.3.0 state: From a58da996eb4890b0d750d84832c751ca42fa79fd Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 11:20:57 -0300 Subject: [PATCH 12/26] Changed default to False for Multicast Support --- plugins/modules/ec2_transit_gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/ec2_transit_gateway.py b/plugins/modules/ec2_transit_gateway.py index cbc944053fb..022f84c294d 100644 --- a/plugins/modules/ec2_transit_gateway.py +++ b/plugins/modules/ec2_transit_gateway.py @@ -496,7 +496,7 @@ def setup_module_object(): auto_attach=dict(type="bool", default=False), auto_propagate=dict(type="bool", default=True), description=dict(type="str"), - multicast_support=dict(type="bool", default=True), + multicast_support=dict(type="bool", default=False), dns_support=dict(type="bool", default=True), purge_tags=dict(type="bool", default=True), state=dict(default="present", choices=["present", "absent"]), From a49e45b16815d141c6a148cefbf78227e5f4d04e Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 11:49:47 -0300 Subject: [PATCH 13/26] removed default for multicast support --- plugins/modules/ec2_transit_gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/ec2_transit_gateway.py b/plugins/modules/ec2_transit_gateway.py index 022f84c294d..d4d2816d8ff 100644 --- a/plugins/modules/ec2_transit_gateway.py +++ b/plugins/modules/ec2_transit_gateway.py @@ -496,7 +496,7 @@ def setup_module_object(): auto_attach=dict(type="bool", default=False), auto_propagate=dict(type="bool", default=True), description=dict(type="str"), - multicast_support=dict(type="bool", default=False), + multicast_support=dict(type="bool"), dns_support=dict(type="bool", default=True), purge_tags=dict(type="bool", default=True), state=dict(default="present", choices=["present", "absent"]), From 75c0c710ac41e1913fc11de6681c8d101ab60a57 Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 13:21:58 -0300 Subject: [PATCH 14/26] Update plugins/modules/ec2_transit_gateway.py Co-authored-by: Alina Buzachis --- plugins/modules/ec2_transit_gateway.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/modules/ec2_transit_gateway.py b/plugins/modules/ec2_transit_gateway.py index d4d2816d8ff..d253e269f7b 100644 --- a/plugins/modules/ec2_transit_gateway.py +++ b/plugins/modules/ec2_transit_gateway.py @@ -45,7 +45,6 @@ multicast_support: description: - Whether to enable AWS Multicast support. Valid only at the time of creation of the Transit Gateway. - default: false type: bool version_added: 7.3.0 state: From 2250714c02bd488e6443db8038b3d56efe444ccc Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 14:17:58 -0300 Subject: [PATCH 15/26] Add integration test to create with multicast enabled and check if is enabled --- .../ec2_transit_gateway/tasks/main.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml index 0843e50f194..e596e54b50a 100644 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -22,6 +22,17 @@ assert: that: - create_result.changed == True + + - name: test create transit gateway with multicast enabled + ec2_transit_gateway: + description: "{{ tgw_description }}" + multicast_support: true + register: create_result + + - name: assert changed is True + assert: + that: + - create_result.changed == True - name: test update transit gateway with tags by description ec2_transit_gateway: @@ -130,6 +141,18 @@ that: - 'result.changed == false' - 'result.transit_gateways != []' + + - name: test success with multicast enabled + ec2_transit_gateway_info: + filters: + options.multicast-support: enable + register: result + - name: assert success with transit_gateway_id filter + assert: + that: + - 'result.changed == true' + - 'result.transit_gateways != [] + always: ###### TEARDOWN STARTS HERE ###### - name: delete transit gateway From dc93baaabfcd1dbe05fb6fc76ac9c2760c5c3043 Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 14:22:16 -0300 Subject: [PATCH 16/26] removed multicast filter from multiple filters test --- tests/integration/targets/ec2_transit_gateway/tasks/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml index e596e54b50a..07e99c528ef 100644 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -134,7 +134,6 @@ filters: options.dns-support: enable options.vpn-ecmp-support: enable - options.multicast-support: enable register: result - name: assert success with transit_gateway_id filter assert: From 986c5eca12641172653ab742dc91fd6aa02b10e5 Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 15:12:23 -0300 Subject: [PATCH 17/26] fix multicast test --- tests/integration/targets/ec2_transit_gateway/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml index 07e99c528ef..774b67f913f 100644 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -150,7 +150,7 @@ assert: that: - 'result.changed == true' - - 'result.transit_gateways != [] + - 'result.transit_gateways != [] always: ###### TEARDOWN STARTS HERE ###### From e78a2c943c9b3c5443dc5014410bedf66869919f Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 16:30:43 -0300 Subject: [PATCH 18/26] fix multicast test --- tests/integration/targets/ec2_transit_gateway/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml index 774b67f913f..382c61c7407 100644 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -150,7 +150,7 @@ assert: that: - 'result.changed == true' - - 'result.transit_gateways != [] + - 'result.transit_gateways != []' always: ###### TEARDOWN STARTS HERE ###### From 94f59e4af2daad4e45cddb46165ea81a5898b3ab Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Thu, 4 Apr 2024 17:23:52 -0300 Subject: [PATCH 19/26] Update main.yml --- .../targets/ec2_transit_gateway/tasks/main.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml index 382c61c7407..95f1c2e4925 100644 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -140,18 +140,7 @@ that: - 'result.changed == false' - 'result.transit_gateways != []' - - - name: test success with multicast enabled - ec2_transit_gateway_info: - filters: - options.multicast-support: enable - register: result - - name: assert success with transit_gateway_id filter - assert: - that: - - 'result.changed == true' - - 'result.transit_gateways != []' - + always: ###### TEARDOWN STARTS HERE ###### - name: delete transit gateway From 3c3a8f78fe02fcd1ecc7f5f5c34afc891f950d3c Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Fri, 5 Apr 2024 08:37:58 -0300 Subject: [PATCH 20/26] Update tests/integration/targets/ec2_transit_gateway/tasks/main.yml Co-authored-by: Alina Buzachis --- .../targets/ec2_transit_gateway/tasks/main.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml index 95f1c2e4925..5c4e9944f68 100644 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -23,9 +23,13 @@ that: - create_result.changed == True + - name: generate unique value for testing + set_fact: + tgw_description_multicast: "{{ resource_prefix }}-tgw-multicast" + - name: test create transit gateway with multicast enabled ec2_transit_gateway: - description: "{{ tgw_description }}" + description: "{{ tgw_description_multicast }}" multicast_support: true register: create_result @@ -33,6 +37,17 @@ assert: that: - create_result.changed == True + + - name: test success with filter + ec2_transit_gateway_info: + filters: + options.multicast-support: enable + register: result + + - name: assert success with multicast-support filter + assert: + that: + - 'result.transit_gateways != []' - name: test update transit gateway with tags by description ec2_transit_gateway: From f4e0de50dd287b22a1b08fe5e1ef2fd744aea67e Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Fri, 5 Apr 2024 08:40:55 -0300 Subject: [PATCH 21/26] fix some multicast tests --- tests/integration/targets/ec2_transit_gateway/tasks/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml index 5c4e9944f68..96e17253248 100644 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -160,6 +160,9 @@ ###### TEARDOWN STARTS HERE ###### - name: delete transit gateway ec2_transit_gateway: - description: "{{ tgw_description }}" + description: "{{ item }}" state: absent ignore_errors: yes + loop: + - "{{ tgw_description }}" + - "{{ tgw_description_multicast }}" From 45197466b736e1eb85864e9b8719d6a7d2751d24 Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:07:51 -0300 Subject: [PATCH 22/26] fix issues with multicast test --- .../ec2_transit_gateway/tasks/main.yml | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml index 96e17253248..241c9c2c324 100644 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -23,32 +23,6 @@ that: - create_result.changed == True - - name: generate unique value for testing - set_fact: - tgw_description_multicast: "{{ resource_prefix }}-tgw-multicast" - - - name: test create transit gateway with multicast enabled - ec2_transit_gateway: - description: "{{ tgw_description_multicast }}" - multicast_support: true - register: create_result - - - name: assert changed is True - assert: - that: - - create_result.changed == True - - - name: test success with filter - ec2_transit_gateway_info: - filters: - options.multicast-support: enable - register: result - - - name: assert success with multicast-support filter - assert: - that: - - 'result.transit_gateways != []' - - name: test update transit gateway with tags by description ec2_transit_gateway: description: "{{ tgw_description }}" @@ -101,6 +75,32 @@ assert: that: - result.changed == False + + - name: generate unique value for testing + set_fact: + tgw_description_multicast: "{{ resource_prefix }}-tgw-multicast" + + - name: test create transit gateway with multicast enabled + ec2_transit_gateway: + description: "{{ tgw_description_multicast }}" + multicast_support: true + register: create_result + + - name: assert changed is True + assert: + that: + - create_result.changed == True + + - name: test success with filter + ec2_transit_gateway_info: + filters: + options.multicast-support: enable + register: result + + - name: assert success with multicast-support filter + assert: + that: + - 'result.transit_gateways != []' # ==== Combine ec2_transit_gateway_info ====================== - name: test success with no parameters From d7b5ae9387a17bf4ba7c6e40d9c041429983391d Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Mon, 8 Apr 2024 12:22:07 -0300 Subject: [PATCH 23/26] Remove trailing whitespace to fix transitgateway.py --- plugins/module_utils/transitgateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/module_utils/transitgateway.py b/plugins/module_utils/transitgateway.py index 3069e0ed9a2..8a82a839ff1 100644 --- a/plugins/module_utils/transitgateway.py +++ b/plugins/module_utils/transitgateway.py @@ -191,7 +191,7 @@ def _set_option(self, name, value): def set_dns_support(self, value): return self._set_option("DnsSupport", value) - + def set_multicast_support(self, value): return self._set_option("MulticastSupport", value) From 47b0a3046bc0d53544c9e71a04b10d7a45b3ae2a Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Tue, 9 Apr 2024 07:33:41 -0300 Subject: [PATCH 24/26] fixed CHANGELOG.rst --- CHANGELOG.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 17fc06a45ed..b47d79fe4a2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,29 @@ community.aws Release Notes .. contents:: Topics +v7.2.0 +====== + +Release Summary +--------------- + +This release includes a new module ``dynamodb_table_info``, new features for the ``glue_job`` and ``msk_cluster`` modules, and a bugfix for the ``aws_ssm`` connection plugin. + +Minor Changes +------------- + +- glue_job - add support for 2 new instance types which are G.4X and G.8X (https://github.com/ansible-collections/community.aws/pull/2048). +- msk_cluster - Support for additional ``m5`` and ``m7g`` types of MSK clusters (https://github.com/ansible-collections/community.aws/pull/1947). + +Bugfixes +-------- + +- ssm(connection) - fix bucket region logic when region is ``us-east-1`` (https://github.com/ansible-collections/community.aws/pull/1908). + +New Modules +----------- + +- dynamodb_table_info - Returns information about a Dynamo DB table v7.1.0 ====== From c6c67f39559d412f19eec6d30884488920c27ffc Mon Sep 17 00:00:00 2001 From: Carlos Schimidt <40364204+cschimid@users.noreply.github.com> Date: Tue, 9 Apr 2024 07:56:20 -0300 Subject: [PATCH 25/26] try to remove trainling whitespace on line 9 ec2_transit_gateway_info.py --- plugins/modules/ec2_transit_gateway_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/ec2_transit_gateway_info.py b/plugins/modules/ec2_transit_gateway_info.py index 44585645d78..014c875b6a0 100644 --- a/plugins/modules/ec2_transit_gateway_info.py +++ b/plugins/modules/ec2_transit_gateway_info.py @@ -6,7 +6,7 @@ DOCUMENTATION = r""" module: ec2_transit_gateway_info -short_description: Gather information about ec2 transit gateways in AWS +short_description: Gather information about ec2 transit gateways in AWS version_added: 1.0.0 description: - Gather information about ec2 transit gateways in AWS From e90b8bd5b16d977d3d1105fcab26c0faecf7e1a4 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Tue, 2 Jul 2024 15:35:40 +0200 Subject: [PATCH 26/26] bump version_added --- plugins/modules/ec2_transit_gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/ec2_transit_gateway.py b/plugins/modules/ec2_transit_gateway.py index d253e269f7b..c3a1079e5c9 100644 --- a/plugins/modules/ec2_transit_gateway.py +++ b/plugins/modules/ec2_transit_gateway.py @@ -46,7 +46,7 @@ description: - Whether to enable AWS Multicast support. Valid only at the time of creation of the Transit Gateway. type: bool - version_added: 7.3.0 + version_added: 8.1.0 state: description: - C(present) to ensure resource is created.