I am using the following settings for creating a transit gateway through CloudFormation.
AutoAcceptSharedAttachments: disable
DefaultRouteTableAssociation: enable
DefaultRouteTablePropagation: enable
I want to know how can one get the "TransitGatewayRouteTableId" in this situation? It is a necessary property for creating a static route in the default transit gateway route table.
Type: AWS::EC2::TransitGatewayRoute
Properties:
Blackhole: Boolean
DestinationCidrBlock: String
TransitGatewayAttachmentId: String
TransitGatewayRouteTableId: String
I have already tried the following !GetAtt
intrinsic function but it doesn't work since it seems that the only return value for a transit gateway resource is the id
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html
TransitGatewayRouteTableId: !GetAtt TransitGateway.AssociationDefaultRouteTableId