Skip to content

Terraform module for managing AWS Transit Gateway resources

License

Notifications You must be signed in to change notification settings

bsakdol/terraform-aws-tgw

Repository files navigation

terraform-aws-tgw

Terraform module for managing AWS Transit Gateway resources.

Usage

IMPORTANT NOTE: The main branch is used as the module source for the usage examples, in place of the version. It is important to pin the release tag (e.g. ?ref=tags/x.y.z) for the module to the source, when using any portion of this module to provision resources. The main branch may contain undocumented breaking changes.

module "vpc" {
  source = "https://github.com/bsakdol/terraform-aws-tgw?ref=main"

  name = "example-tgw"

  amazon_side_asn = 65535

  tags = {
    Environment = "development"
    Owner       = "bsakdol"
    Terraform   = "true"
  }
}

Examples

Requirements

Name Version
terraform >= 1.1
aws >= 4.8

Providers

Name Version
aws >= 4.8

Modules

No modules.

Resources

Name Type
aws_ec2_tag.this resource
aws_ec2_transit_gateway.this resource

Inputs

Name Description Type Default Required
amazon_side_asn 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.
number 64512 no
auto_accept_shared_attachments Whether resource attachment requests are automatically accepted. bool false no
default_route_table_association Whether resource attachments are automatically associated with the default
association route table.
bool true no
default_route_table_propagation Whether resource attachments automatically propagate routes to the default
propagation route table.
bool true no
description Description of the EC2 Transit Gateway. string null no
dns_support Whether DNS support is enabled. bool true no
manage_tgw A boolean flag to control whether or not to manage TGW resources. bool true no
multicast_support Whether multicast is enabled. bool false no
name Name to be used as an identifier of all managed resources. string null no
tags Key-value tags for the EC2 Transit Gateway. If configured with a provider
default_tags configuration block present, tags with matching keys will
overwrite those defined at the provider-level.
map(string) {} no
timeouts Create, update, and delete timeout configuration options for the Transit Gateway. map(string) {} no
transit_gateway_cidr_blocks 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.
list(string) [] no
transit_gateway_tags A map of tags to assign to the TGW resource. Resource specific tags will
override all other tags.
map(string) {} no
vpn_ecmp_support Whether VPN Equal Cost Multipath Protocol support is enabled. bool true no

Outputs

Name Description
arn EC2 Transit Gateway Amazon Resource Name (ARN).
association_default_route_table_id Identifier of the default association route table.
id EC2 Transit Gateway identifier.
owner_id Identifier of the AWS account that owns the EC2 Transit Gateway.
propagation_default_route_table_id Identifier of the AWS account that owns the EC2 Transit Gateway.
tags_all A map of tags assigned to the resource, including those inherited from the
provider default_tags configuration block.
tgw_all A map of TGW attributes.

About

Terraform module for managing AWS Transit Gateway resources

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages