- This Transit Gateway Centralized Router module will create a hub spoke topology from existing Tiered VPCs.
- Will use the special public subnet in each AZ when a Tiered VPC is passed to it.
- All attachments will be associated and routes propagated to one TGW Route Table.
- Each Tiered VPC will have all their route tables updated in each VPC with a route to all other VPC networks via the TGW.
- Will generate and add routes in each VPC to all other networks.
Example:
module "centralized_router" {
source = "JudeQuintana/centralized-router/aws"
version = "1.0.0"
env_prefix = var.env_prefix
region_az_labels = var.region_az_labels
centralized_router = {
name = "bishop"
amazon_side_asn = 64512
blackhole_cidrs = ["172.16.8.0/24"]
vpcs = module.vpcs
}
}
Blog Post: Terraform Networking Trifecta
Main:
- Networking Trifecta Demo
- See Trifecta Demo Time for instructions.
Name | Version |
---|---|
terraform | >=1.3 |
aws | >=4.20 |
Name | Version |
---|---|
aws | >=4.20 |
Name | Source | Version |
---|---|---|
this_generate_routes_to_other_vpcs | ./modules/generate_routes_to_other_vpcs | n/a |
Name | Type |
---|---|
aws_ec2_transit_gateway.this | resource |
aws_ec2_transit_gateway_route.this_blackholes | resource |
aws_ec2_transit_gateway_route_table.this | resource |
aws_ec2_transit_gateway_route_table_association.this | resource |
aws_ec2_transit_gateway_route_table_propagation.this | resource |
aws_ec2_transit_gateway_vpc_attachment.this | resource |
aws_route.this_vpc_routes_to_other_vpcs | resource |
aws_caller_identity.this | data source |
aws_region.this | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
centralized_router | Centralized Router configuration | object({ |
n/a | yes |
env_prefix | prod, stage, test | string |
n/a | yes |
region_az_labels | Region and AZ names mapped to short naming conventions for labeling | map(string) |
n/a | yes |
tags | Additional Tags | map(string) |
{} |
no |
Name | Description |
---|---|
account_id | n/a |
amazon_side_asn | n/a |
blackhole_cidrs | n/a |
full_name | n/a |
id | n/a |
name | n/a |
region | n/a |
route_table_id | n/a |
vpc | n/a |