Skip to content

Commit

Permalink
feat(ec2-vpc-cagw): Add support for Route entry to Carrier GW
Browse files Browse the repository at this point in the history
  • Loading branch information
mtulio committed Jul 13, 2022
1 parent 7f4b4a3 commit 5f23199
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/modules/ec2_vpc_route_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 5f23199

Please sign in to comment.