/terraform-aws-transit-gateway-hub

Terraform module for handling the Transit Gateway hub resources

Primary LanguageMakefileMIT LicenseMIT

Terraform Transit Gateway "hub" module

We are following the hub-spoke(s) (aka star network) network topology model.

This Terraform module aims to handle the AWS resources required by a so-called "hub" node.

This module assumes that its pair module was used: terraform-aws-transit-gateway-satellite to handle the satellite(s).

Check out some use cases in the examples.

Assumptions

Credentials

See this example to first make sure that the credentials you want to use allow for cross-account actions.

You can read more about how Terraform handles this here.

Obviously, all the supported authentication methods can also be used.

Requirements

Name Version
terraform >= 1.0
aws >= 5

Providers

Name Version
aws >= 5

Modules

No modules.

Resources

Name Type
aws_ec2_transit_gateway.this resource
aws_ec2_transit_gateway_route_table.this resource
aws_ram_principal_association.this resource
aws_ram_resource_association.this resource
aws_ram_resource_share.this resource

Inputs

Name Description Type Default Required
aws_account_id_hub AWS account number containing the TGW hub string n/a yes
aws_account_id_satellite List of AWS account numbers representing the satellites of the TGW list(string) n/a yes
name Name to be used on all the resources as identifier string n/a yes
allow_external_principals Allow external principals to be used for TGW resource share bool false no
auto_accept_shared_attachments Whether resource attachment requests are automatically accepted string "enable" no
default_route_table_association Whether resource attachments are automatically associated with the default association route table string "disable" no
default_route_table_propagation Whether resource attachments automatically propagate routes to the default propagation route table string "disable" no
description Description of the Transit Gateway string null no
tags A map of tags to add to all resources map(string) {} no

Outputs

Name Description
ram_principal_association_id Identifier of the Resource Access Manager Principal Association
ram_resource_association_id Identifier of the Resource Access Manager Resource Association
ram_resource_share_arn ARN of the Resource Access Manager Resource Share
ram_resource_share_id Identifier of the Resource Access Manager Resource Share
transit_gateway_arn ARN of the Transit Gateway
transit_gateway_id Identifier of the Transit Gateway
transit_gateway_route_table_id Identifier of the Transit Gateway Route Table