Skip to content

Resource: awsEc2TransitGateway

Manages an EC2 Transit Gateway.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.ec2TransitGateway.Ec2TransitGateway(this, "example", {
  description: "example",
});

Argument Reference

The following arguments are supported:

  • amazonSideAsn - (Optional) 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. Default value: 64512.

-> NOTE: Modifying amazonSideAsn on a Transit Gateway with active BGP sessions is not allowed. You must first delete all Transit Gateway attachments that have BGP configured prior to modifying amazonSideAsn.

  • autoAcceptSharedAttachments - (Optional) Whether resource attachment requests are automatically accepted. Valid values: disable, enable. Default value: disable.
  • defaultRouteTableAssociation - (Optional) Whether resource attachments are automatically associated with the default association route table. Valid values: disable, enable. Default value: enable.
  • defaultRouteTablePropagation - (Optional) Whether resource attachments automatically propagate routes to the default propagation route table. Valid values: disable, enable. Default value: enable.
  • description - (Optional) Description of the EC2 Transit Gateway.
  • dnsSupport - (Optional) Whether DNS support is enabled. Valid values: disable, enable. Default value: enable.
  • multicastSupport - (Optional) Whether Multicast support is enabled. Required to use ec2TransitGatewayMulticastDomain. Valid values: disable, enable. Default value: disable.
  • tags - (Optional) Key-value tags for the EC2 Transit Gateway. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  • transitGatewayCidrBlocks - (Optional) One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.
  • vpnEcmpSupport - (Optional) Whether VPN Equal Cost Multipath Protocol support is enabled. Valid values: disable, enable. Default value: enable.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - EC2 Transit Gateway Amazon Resource Name (ARN)
  • associationDefaultRouteTableId - Identifier of the default association route table
  • id - EC2 Transit Gateway identifier
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
  • ownerId - Identifier of the AWS account that owns the EC2 Transit Gateway
  • propagationDefaultRouteTableId - Identifier of the default propagation route table

Timeouts

Configuration options:

  • create - (Default 10M)
  • update - (Default 10M)
  • delete - (Default 10M)

Import

awsEc2TransitGateway can be imported by using the EC2 Transit Gateway identifier, e.g.,

$ terraform import aws_ec2_transit_gateway.example tgw-12345678