Module library

Transit Gateway

Terraform module to create AWS Transit Gateway resources

Inputs

29
amazon_side_asnoptionalstring

The Autonomous System Number (ASN) for the Amazon side of the gateway. By default the TGW is created with the current default Amazon ASN.

Defaultnull
create_tgwoptionalbool

Controls if TGW should be created (it affects almost all resources)

Defaulttrue
create_tgw_routesoptionalbool

Controls if TGW Route Table / Routes should be created

Defaulttrue
descriptionoptionalstring

Description of the EC2 Transit Gateway

Defaultnull
enable_auto_accept_shared_attachmentsoptionalbool

Whether resource attachment requests are automatically accepted

Defaultfalse
enable_default_route_table_associationoptionalbool

Whether resource attachments are automatically associated with the default association route table

Defaulttrue
enable_default_route_table_propagationoptionalbool

Whether resource attachments automatically propagate routes to the default propagation route table

Defaulttrue
enable_dns_supportoptionalbool

Should be true to enable DNS support in the TGW

Defaulttrue
enable_encryption_supportoptionalbool

Should be true to enable encryption support in the TGW

Defaultfalse
enable_multicast_supportoptionalbool

Whether multicast support is enabled

Defaultfalse
enable_sg_referencing_supportoptionalbool

Indicates whether to enable security group referencing support

Defaulttrue
enable_vpn_ecmp_supportoptionalbool

Whether VPN Equal Cost Multipath Protocol support is enabled

Defaulttrue
nameoptionalstring

Name to be used on all the resources as identifier

Default""
ram_allow_external_principalsoptionalbool

Indicates whether principals outside your organization can be associated with a resource share.

Defaultfalse
ram_nameoptionalstring

The name of the resource share of TGW

Default""
ram_principalsoptionallist(string)

A list of principals to share TGW with. Possible values are an AWS account ID, an AWS Organizations Organization ARN, or an AWS Organizations Organization Unit ARN

Default[]
ram_resource_share_arnoptionalstring

ARN of RAM resource share

Default""
ram_tagsoptionalmap(string)

Additional tags for the RAM

Default{}
regionoptionalstring

Region where the resource(s) will be managed. Defaults to the region set in the provider configuration

Defaultnull
share_tgwoptionalbool

Whether to share your transit gateway with other accounts

Defaulttrue
tagsoptionalmap(string)

A map of tags to add to all resources

Default{}
tgw_default_route_table_tagsoptionalmap(string)

Additional tags for the Default TGW route table

Default{}
tgw_route_table_tagsoptionalmap(string)

Additional tags for the TGW route table

Default{}
tgw_tagsoptionalmap(string)

Additional tags for the TGW

Default{}
tgw_vpc_attachment_tagsoptionalmap(string)

Additional tags for VPC attachments

Default{}
timeoutsoptionalobject({ create = optional(string) update = optional(string) delete = optional(s…

Create, update, and delete timeout configurations for the transit gateway

Defaultnull
transit_gateway_cidr_blocksoptionallist(string)

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

Default[]
transit_gateway_route_table_idoptionalstring

Identifier of EC2 Transit Gateway Route Table to use with the Target Gateway when reusing it between multiple TGWs

Defaultnull
vpc_attachmentsoptionalany

Maps of maps of VPC details to attach to TGW. Type 'any' to disable type validation by Terraform.

Default{}

All 29 are optional — the module deploys with none of them set.

Outputs

17
ec2_transit_gateway_arn

EC2 Transit Gateway Amazon Resource Name (ARN)

ec2_transit_gateway_association_default_route_table_id

Identifier of the default association route table

ec2_transit_gateway_id

EC2 Transit Gateway identifier

ec2_transit_gateway_owner_id

Identifier of the AWS account that owns the EC2 Transit Gateway

ec2_transit_gateway_propagation_default_route_table_id

Identifier of the default propagation route table

ec2_transit_gateway_route_ids

List of EC2 Transit Gateway Route Table identifier combined with destination

ec2_transit_gateway_route_table_association

Map of EC2 Transit Gateway Route Table Association attributes

ec2_transit_gateway_route_table_association_ids

List of EC2 Transit Gateway Route Table Association identifiers

ec2_transit_gateway_route_table_default_association_route_table

Boolean whether this is the default association route table for the EC2 Transit Gateway

ec2_transit_gateway_route_table_default_propagation_route_table

Boolean whether this is the default propagation route table for the EC2 Transit Gateway

ec2_transit_gateway_route_table_id

EC2 Transit Gateway Route Table identifier

ec2_transit_gateway_route_table_propagation

Map of EC2 Transit Gateway Route Table Propagation attributes

ec2_transit_gateway_route_table_propagation_ids

List of EC2 Transit Gateway Route Table Propagation identifiers

ec2_transit_gateway_vpc_attachment

Map of EC2 Transit Gateway VPC Attachment attributes

ec2_transit_gateway_vpc_attachment_ids

List of EC2 Transit Gateway VPC Attachment identifiers

ram_principal_association_id

The Amazon Resource Name (ARN) of the Resource Share and the principal, separated by a comma

ram_resource_share_id

The Amazon Resource Name (ARN) of the resource share

What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.