Skip to main content

Transit Gateway Attachment module for VM-Series

A Terraform module for deploying AWS Transit Gateways Attachments.

AWS provides a network transit hub called a Transit Gateway. One or more VPCs can connect to a Transit Gateway through a Transit Gateway (TGW) Attachment.

GitHub Logo Terraform Logo

Usage

For example usage, please refer to the examples directory.

Reference

Requirements

NameVersion
terraform>= 1.0.0, < 2.0.0
aws~> 5.17

Providers

NameVersion
aws~> 5.17

Modules

No modules.

Resources

NameType
aws_ec2_transit_gateway_route_table_association.thisresource
aws_ec2_transit_gateway_route_table_propagation.thisresource
aws_ec2_transit_gateway_vpc_attachment.thisresource

Inputs

NameDescriptionTypeDefaultRequired
appliance_mode_supportSee the provider documentation.string"enable"no
dns_supportSee the provider documentation.stringnullno
ipv6_supportSee the provider documentation.stringnullno
nameOptional readable name of the TGW attachment object. It is assigned to the usual AWS Name tag.stringnullno
propagate_routes_toMap of route propagations from this attachment. Each key is an arbitrary string, each value is the id of a TGW route table which should receive the routes to the attached VPC CIDRs.map(string){}no
subnetsThe attachment's subnets as a map. Each key is the availability zone name and each object has an attribute
id identifying AWS subnet.
All subnets in the map obtain virtual network interfaces attached to the TGW.
Example for users of module subnet_set:
subnets = module.subnet_set.subnets
Example:
subnets = {
"us-east-1a" = { id = "snet-123007" }
"us-east-1b" = { id = "snet-123008" }
}
map(object({
id = string
}))
n/ayes
tagsAWS tags to assign to all the created objects.map(string){}no
transit_gateway_route_tableTGW's route table which should receive the traffic coming from the subnet_set (also called an association). An object with at least two attributes:
transit_gateway_route_table = {
id = "tgw-rtb-1234"
transit_gateway_id = "tgw-1234"
}
object({
id = string
transit_gateway_id = string
})
n/ayes
vpc_idAWS identifier of a VPC containing the Attachment.stringn/ayes

Outputs

NameDescription
attachmentThe entire aws_ec2_transit_gateway_vpc_attachment object.
next_hop_setThe Next Hop Set object, useful as an input to the vpc_route module. The intention would
be to route traffic from several subnets to the Transit Gateway. Example:
next_hop_set = {
ids = {}
id = "tgw-attach-123"
type = "transit_gateway"
}
subnetsSame as the input subnets. Intended to be used as a dependency.