Back to Terraform Provider Aws

EC2 Transit Gateway intra-region Peering

examples/transit-gateway-intra-region-peering/README.md

6.44.01.0 KB
Original Source
<!-- Copyright IBM Corp. 2014, 2026 --> <!-- SPDX-License-Identifier: MPL-2.0 -->

EC2 Transit Gateway intra-region Peering

This example demonstrates how to create two Transit Gateways in one AWS account and the same region, attach a VPC each, and then create a Peering Attachment between the two Transit Gateways.

See more in the Transit Gateway intra-region Peering documentation.

Running this example

Either cp terraform.template.tfvars terraform.tfvars and modify that new file accordingly or provide variables via CLI:

terrform
terraform apply \
	-var="aws_profile=aws-account" \
	-var="aws_region=us-east-1" 

Prerequisites

  • This example requires one AWS accounts within the same AWS Organizations Organization
  • Ensure Resource Access Manager is enabled in your organization. For more information, see the Resource Access Manager User Guide.