How to avoid circular dependency between transit gateway and route table?
In Cloudformation template I have an option to define
PropagationDefaultRouteTableId for TransitGateway.
Type: AWS::EC2::TransitGateway Properties: ... AssociationDefaultRouteTableId: String ... PropagationDefaultRouteTableId: String
But TransitGatewayRouteTable has mandatory parameter
TransitGatewayId and this causes a circular dependency between route table and transit gateway :-(
Type: AWS::EC2::TransitGatewayRouteTable Properties: ... TransitGatewayId: String
Is there a way to get around this somehow and actually set
PropagationDefaultRouteTableId for transit gateway from Cloudformation template ?
I don't think you'll be able to do this how you are trying as the circular dependency will always be there.
One way that you may be able to achieve the same outcome is by using a custom lambda resource to modify the TGW defaults after it's created. Here is an example from github: https://github.com/alexandrespbr/vpcsharednfw/blob/3aad9e78c08610b2e3602364158f78867338db39/egressVpc.yaml#L475
Thanks! This is my thinking as well. The only thing it doesn't explain why such parameters were made available for TransitGateway resource type you can not possibly use. Looks like a bug and missing feature (that ability to set route table id's).
How to avoid circular dependency between transit gateway and route table?Accepted Answerasked 2 months ago
Migration from Transit VPC to AWS Transit GatewayAccepted Answerasked 2 years ago
AWS Transit Gateway through BGP propagation and routing behaviorAccepted Answerasked 2 years ago
AWS Transit Gateway Routing FeaturesAccepted Answerasked 3 years ago
Transit Gateway - defaultsAccepted Answerasked 3 years ago
Transit Gateway - Propagated route limit per Routing TableAccepted Answerasked 3 years ago
Controling BGP Route Propagation in Transit GatewayAccepted Answerasked 2 years ago
Moving to AWS Transit Gateway from VPC PeeringAccepted Answerasked 2 years ago
Will adding VPN already in use to a new transit gateway cause an outage?Accepted Answerasked 3 years ago
New VPC Subnets and Transit Gateway attachmentAccepted AnswerEXPERTasked 2 years ago