AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::EC2::TransitGateway

Creates a transit gateway. For more information, see Amazon VPC Transit Gateways.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::EC2::TransitGateway", "Properties" : { "AmazonSideAsn" : Integer, "AutoAcceptSharedAttachments" : String, "DefaultRouteTableAssociation" : String, "DefaultRouteTablePropagation" : String, "Description" : String, "DnsSupport" : String, "Tags" : [ Tag, ... ], "VpnEcmpSupport" : String } }

YAML

Type: "AWS::EC2::TransitGateway" Properties: AmazonSideAsn: Integer AutoAcceptSharedAttachments: String DefaultRouteTableAssociation: String DefaultRouteTablePropagation: String Description: String DnsSupport: String Tags: - Tag VpnEcmpSupport: String

Properties

AmazonSideAsn

A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.

Required: No

Type: Integer

Update requires: Replacement

AutoAcceptSharedAttachments

Indicates whether attachment requests are automatically accepted. The default is disable.

Required: No

Type: String

Update requires: Replacement

DefaultRouteTableAssociation

Enable or disable automatic association with the default association route table. The default is enable.

Required: No

Type: String

Update requires: Replacement

DefaultRouteTablePropagation

Enable or disable automatic propagation of routes to the default propagation route table. The default is enable.

Required: No

Type: String

Update requires: Replacement

Description

A description of the transit gateway.

Required: No

Type: String

Update requires: Replacement

DnsSupport

Enable or disable DNS support. The default is enable.

Required: No

Type: String

Update requires: Replacement

Tags

The tags to apply to the transit gateway.

Required: No

Type: List of Resource Tag property types

Update requires: Replacement

VpnEcmpSupport

Enable or disable Equal Cost Multipath Protocol. The default is enable.

Required: No

Type: String

Update requires: Replacement

Return Values

Ref

When you pass the logical ID of an AWS::EC2::TransitGateway resource to the intrinsic Ref function, the function returns the ID of the transit gateway, such as tgw-1234567891234567.

For more information about using the Ref function, see Ref.

Example

JSON

{ "Resources": { "myTransitGateway": { "Type": "AWS::EC2::TransitGateway", "Properties": { "AmazonSideAsn": 65000, "Description": "TGW Route Integration Test", "AutoAcceptSharedAttachments": "disable", "DefaultRouteTableAssociation": "enable", "DnsSupport": "enable", "VpnEcmpSupport": "enable", "Tags": [ { "Key": "Application", "Value": { "Ref": "AWS::StackId" } } ] } } } }

YAML

Resources: myTransitGateway: Type: "AWS::EC2::TransitGateway" Properties: AmazonSideAsn: 65000 Description: "TGW Route Integration Test" AutoAcceptSharedAttachments: "disable" DefaultRouteTableAssociation: "enable" DnsSupport: "enable" VpnEcmpSupport: "enable" Tags: - Key: Application Value: !Ref 'AWS::StackId'

See Also