Skip to content

rhythmictech/terraform-aws-transitgateway

Repository files navigation

terraform-aws-transitgateway

Manage a Transit Gateway. Supports using Resource Access Manager to share a Transit Gateway across multiple accounts.

module "tgw" {
  source             = "git::https://github.com/rhythmictech/terraform-aws-transitgateway"
  amazon_side_asn    = 65400
  description        = "example"
  subnet_ids         = module.vpc.private_subnets
  vpc_id             = module.vpc.vpc_id
}

Requirements

Name Version
terraform >= 0.14
aws >= 3.0

Providers

Name Version
aws >= 3.0

Modules

No modules.

Resources

Name Type
aws_ec2_transit_gateway.tgw resource
aws_ec2_transit_gateway_vpc_attachment.tgw_attach resource
aws_ram_principal_association.tgw_ram_principal resource
aws_ram_resource_association.tgw_ram_resource resource
aws_ram_resource_share.tgw_share resource

Inputs

Name Description Type Default Required
allow_external_principals Allow resources to be shared outside of your AWS org bool false no
amazon_side_asn Amazon Side ASN number n/a yes
description Description used in Transit Gateway string n/a yes
name Name of transit gateway and related resources string "tgw" no
resource_share_accounts Accounts to share gateway with (leave blank for none) list(string) [] no
subnet_ids Subnets to create transit gateway in (must use one subnet for every AZ you wish to use the tgw in) list(string) [] no
tags Tags to add to any resources that support it map(string) {} no
vpc_id VPC to create transit gateway in string n/a yes

Outputs

Name Description
transit_gateway Transit Gateway Resource
transit_gateway_id ID of Transit Gateway

Related Projects