AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::TransitGatewayRouteTableAssociation

CfnTransitGatewayRouteTableAssociation

Associates the specified attachment with the specified transit gateway route table. You can associate one route table with an attachment. Before you can update the route table associated with an attachment, you must disassociate the transit gateway route table that is currently associated with the attachment. First update the stack to remove the associated transit gateway route table, and then update the stack with the ID of the new transit gateway route table to associate. In addition, the attachment must be in an `available` state; otherwise, the request will return an error.

Import

import { CfnTransitGatewayRouteTableAssociation } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnTransitGatewayRouteTableAssociation

Properties

Configuration passed to the constructor as CfnTransitGatewayRouteTableAssociationProps.

transitGatewayAttachmentIdRequired
string | ITransitGatewayAttachmentRef

The ID of the attachment.

transitGatewayRouteTableIdRequired
string | ITransitGatewayRouteTableRef

The ID of the route table for the transit gateway.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic