how to get transit gateway default association route table id

0

I have a CFT that creates a transit gateway. I need to add a static route to the TGW Route Table for that TGW. I don't see any way to get the ID of the default TGW Route Table.

2 Answers
0

Hello.

As far as I know, there is currently no way to get the ID of the Transit Gateway route table created by default in CloudFormation.

profile picture
EXPERT
answered 8 months ago
0

Yea I don't see there's a way to check it via CloudFormation but you can use CLI or console to check the same:

CLI Example:

> aws ec2 describe-transit-gateway-route-tables
{
    "TransitGatewayRouteTables": [
        {
            "TransitGatewayRouteTableId": "tgw-rtb-abcdehgh",
            "TransitGatewayId": "tgw-abcdehgh",
            "State": "available",
            "DefaultAssociationRouteTable": true,
            "DefaultPropagationRouteTable": true,
            "CreationTime": "2023-01-1T22:22:22+00:00",
            "Tags": []
        }
    ]
}

Reference: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-transit-gateway-route-tables.html

profile picture
EXPERT
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions