Setting up AWS Transit Gateway with Terraform

Transit Gateway allows VPC's to be connected together into a single network as well as connecting to on-prem networks.

This example will deploy a simple setup with 2 VPC's being connected together.

Image alt

The Terraform code can be found on GitHub. The code also includes a RAM (Resource Access Manager) share for linking VPC's in separate accounts but in this examples it's not used.

Just update any the reqruired settings in variables.tf then deploy

1terraform init
2terraform plan
3terraform apply

To remove the example

1terraform destroy
comments powered by Disqus