awslabs / landing-zone-accelerator-on-aws

Deploy a multi-account cloud foundation to support highly-regulated workloads and complex compliance requirements.
https://aws.amazon.com/solutions/implementations/landing-zone-accelerator-on-aws/
Apache License 2.0
543 stars 435 forks source link

Referring dynamic IP ranges allocated by IPAM to VPCs in the route tables #481

Closed vforvarun closed 3 months ago

vforvarun commented 4 months ago

Describe the bug We are using IPAM to allocate IP ranges to VPC. While defining Transit Gateway Route tables, I need to provide the Workload accounts's IP address range as "destinationCidrBlock" which is not readily known because it is dynamically allocated by IPAM.

We can use known IP Address Ranges directly in route tables, but I can't seem to find a way in the documentation to refer dynamic IP ranges allocated by IPAM to VPCs in the route tables be it Transit Gateway or any other route tables.

To Reproduce Define a Route table and try to add a destinationCidrBlock which is dynamically allocated by IPAM.

Expected behavior Should be able to refer the IP Address range dynamically allocated by IPAM in route tables.

Please complete the following information about the solution:

Screenshots N/A

Additional context N/A

erwaxler commented 4 months ago

Hi @vforvarun , thanks for reaching out to the Landing Zone Accelerator team.

The functionality you are describing is not currently supported in the LZA, though you should be able to solve this problem using native Transit Gateway functionality.

When creating the attachment between the VPC and TGW, you can utilize route propagation to automatically add the CIDR of the VPC as a new route to Transit Gateway route table(s).

This can be accomplished in the LZA config one of two ways:

  1. Set defaultRouteTablePropagation to enable - this will automatically create propagated routes for new VPC attachments created on the Transit Gateway.
  2. Specify specific route tables to propagate the route to on the transitGatewayAttachment configuration property of the VPC.