/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.2
aws ~> 4.27.0

Providers

Name Version
aws ~> 4.27.0

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(any) n/a yes
name Name to be used on all the resources as identifier string n/a yes
role_to_assume_hub IAM role name to assume in the AWS account containing the TGW hub (eg. ASSUME-ROLE-HUB) string n/a yes
default_route_table_association Boolean flag for toggling the default route table association string "disable" no
default_route_table_propagation Boolean flag for toggling the propagation of routes in the default 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