From 4a5671c97638244674b51415fbb803428af055ca Mon Sep 17 00:00:00 2001 From: Marco Braga Date: Wed, 13 Jul 2022 04:03:24 -0300 Subject: [PATCH 1/3] feat(ec2-vpc-cagw): Add support for Route entry to Carrier GW --- plugins/modules/ec2_vpc_route_table.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/modules/ec2_vpc_route_table.py b/plugins/modules/ec2_vpc_route_table.py index d88defdeae2..5d21340ab1c 100644 --- a/plugins/modules/ec2_vpc_route_table.py +++ b/plugins/modules/ec2_vpc_route_table.py @@ -256,6 +256,11 @@ returned: when the route is via a NAT gateway type: str sample: local + carrier_gateway_id: + description: ID of the Carrier gateway. + returned: when the route is via a Carrier gateway + type: str + sample: local origin: description: mechanism through which the route is in the table. returned: always @@ -708,6 +713,8 @@ def create_route_spec(connection, module, vpc_id): route_spec['gateway_id'] = igw if route_spec.get('gateway_id') and route_spec['gateway_id'].startswith('nat-'): rename_key(route_spec, 'gateway_id', 'nat_gateway_id') + if route_spec.get('gateway_id') and route_spec['gateway_id'].startswith('cagw-'): + rename_key(route_spec, 'gateway_id', 'carrier_gateway_id') return snake_dict_to_camel_dict(routes, capitalize_first=True) From 4dce468546f32b4fb40c8c32348c3d81758eaff3 Mon Sep 17 00:00:00 2001 From: Marco Braga Date: Thu, 30 Mar 2023 16:30:48 -0300 Subject: [PATCH 2/3] Update plugins/modules/ec2_vpc_route_table.py --- plugins/modules/ec2_vpc_route_table.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/modules/ec2_vpc_route_table.py b/plugins/modules/ec2_vpc_route_table.py index 5d21340ab1c..9b2212b0a43 100644 --- a/plugins/modules/ec2_vpc_route_table.py +++ b/plugins/modules/ec2_vpc_route_table.py @@ -261,6 +261,7 @@ returned: when the route is via a Carrier gateway type: str sample: local + version_added: 6.0.0 origin: description: mechanism through which the route is in the table. returned: always From 49bd68d814b102f2e68a770c8f6725625f38c822 Mon Sep 17 00:00:00 2001 From: Marco Braga Date: Thu, 30 Mar 2023 16:44:26 -0300 Subject: [PATCH 3/3] cagw: add changelog fragment --- changelogs/fragments/926-ec2_vpc_route_table.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/926-ec2_vpc_route_table.yml diff --git a/changelogs/fragments/926-ec2_vpc_route_table.yml b/changelogs/fragments/926-ec2_vpc_route_table.yml new file mode 100644 index 00000000000..83c9f0e0ba1 --- /dev/null +++ b/changelogs/fragments/926-ec2_vpc_route_table.yml @@ -0,0 +1,2 @@ +minor_changes: +- ec2_vpc_route_table - add support for Carrier Gateway entry (https://github.com/ansible-collections/amazon.aws/pull/926).