aws-ia / terraform-aws-vpc

AWS VPC Module
https://registry.terraform.io/modules/aws-ia/vpc/aws/latest
Apache License 2.0
92 stars 98 forks source link

Transit gateway support #38

Closed drewmullen closed 2 years ago

drewmullen commented 2 years ago

Closes: #40, #39

drewmullen commented 2 years ago

updates have been requested:

  subnets = {
    public = {
      netmask = 24
      # "0.0.0.0/0" is explicitly blocked for map to tgw
      route_to_transit_gateway = ["10.0.0.0/8"]
    }

    private = {
      netmask = 24
      # if route_to_nat = true
      # route_to_transit_gateway != 0.0.0.0/0
      route_to_nat = true
      route_to_transit_gateway = ["0.0.0.0/0"]
    }

    transit_gateway = {
      netmask            = 24
      transit_gateway_id = aws_ec2_transit_gateway.example.id
      route_to_nat       = true # default false
      transit_gateway_default_route_table_association = true
      transit_gateway_default_route_table_propagation = true
    }
  }
drewmullen commented 2 years ago

updates have been requested:

  • route from public/private to tgw
  • allow tgw to route to nat
  subnets = {
    public = {
      netmask = 24
      # "0.0.0.0/0" is explicitly blocked for map to tgw
      route_to_transit_gateway = ["10.0.0.0/8"]
    }

    private = {
      netmask = 24
      # if route_to_nat = true
      # route_to_transit_gateway != 0.0.0.0/0
      route_to_nat = true
      route_to_transit_gateway = ["0.0.0.0/0"]
    }

    transit_gateway = {
      netmask            = 24
      transit_gateway_id = aws_ec2_transit_gateway.example.id
      route_to_nat       = true # default false
      transit_gateway_default_route_table_association = true
      transit_gateway_default_route_table_propagation = true
    }
  }

moving to a separate issue: https://github.com/aws-ia/terraform-aws-vpc/issues/41