AWS Fundamentals Logo
AWS Fundamentals
AWS::EC2::TransitGatewayVpcAttachment

EC2 TransitGatewayVpcAttachment

Resource Type definition for AWS::EC2::TransitGatewayVpcAttachment

Properties

7 configurable properties. 3 required. Click a row to see details.

Filter:
PropertyTypeFlags
SubnetIds
Array<string>
RequiredCreate-only
TransitGatewayId
string
RequiredCreate-only
VpcId
string
RequiredCreate-only
AddSubnetIds
Array<string>
Write-only
Options
object
RemoveSubnetIds
Array<string>
Write-only
Tags
Array<Tag>

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
Idstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::TransitGatewayVpcAttachment

Resources:
  MyResource:
    Type: AWS::EC2::TransitGatewayVpcAttachment
    Properties:
      SubnetIds: "my-subnetids"
      VpcId: "my-vpcid"
      TransitGatewayId: "my-transitgatewayid"
      Tags:
        - Key: Environment
          Value: Production

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

ec2:DescribeTransitGatewayVpcAttachmentsec2:CreateTransitGatewayVpcAttachmentec2:CreateTagsec2:DescribeTags

read

ec2:DescribeTransitGatewayVpcAttachmentsec2:DescribeTags

delete

ec2:DescribeTransitGatewayVpcAttachmentsec2:DeleteTransitGatewayVpcAttachmentec2:DeleteTagsec2:DescribeTags

list

ec2:DescribeTransitGatewayVpcAttachmentsec2:DescribeTags

update

ec2:DescribeTransitGatewayVpcAttachmentsec2:DescribeTagsec2:CreateTransitGatewayVpcAttachmentec2:CreateTagsec2:DeleteTransitGatewayVpcAttachmentec2:DeleteTagsec2:ModifyTransitGatewayVpcAttachment

Get the EC2 Cheat Sheet

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

Download Free Infographic

Quick Facts

ServiceEC2
Properties8
Required3
TaggingSupported
Primary IDId

Supported Operations

CreateReadDeleteListUpdate

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

TransitGatewayIdSubnetIdsVpcId

External Links