TransitGatewayAttachment vs TransitGatewayVpcAttachment?

0

Looking at the documentation of AWS::EC2::TransitGatewayAttachment and AWS::EC2::TransitGatewayVpcAttachment it looks that first is a subset of later. If TransitGatewayVpcAttachmentis kept only for backwards compatibility, would it make sense to add a note into documentation stating this is obsolete version, and there is better alternative available?

profile picture
EXPERT
Kallu
asked 2 years ago576 views
1 Answer
1
Accepted Answer

Hello, I understand that AWS::EC2::TransitGatewayAttachment and AWS::EC2::TransitGatewayVpcAttachment look very similar, so here is an explanation of the difference between these 2 templates.

For AWS::EC2::TransitGatewayAttachment, the use case it to attach a specified VPC to a Transit Gateway. This CloudFormation template cannot be used for adding or removing subnets after having a already established attachment, as it will error out. For this reason, it is better suited for creation of the attachment the first time around.

For AWS::EC2::TransitGatewayVpcAttachment, the use case is to specify a certain attachment. This CloudFormation resource will be able to update already established VPC & Transit Gateway connection's Subnets, without having to delete and create an entirely new attachment. For this case, updating the attachment would be preferred.

The link below talks about the implementation of each Template and issues that other users have faced. Please note while this is the official AWS CloudFormation GitHub repository, any user with an account can post, even if they are unaffiliated with AWS.

answered 2 years ago
profile picture
EXPERT
Kallu
reviewed 4 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