Terraform module to create VPC routing table in AWS
# name: the name of the VPC routing table
# block: the block to route via your GW
variable "vpc_rt_example" { default = "example" }
igw_id: The ID of the gateway you want to route the trafic
vpc_id: The ID of the VPC
VPC https://github.com/virsas/terraform_vpc IGW https://github.com/virsas/terraform_vpc_igw
######################
# VPC RT variables
######################
variable "vpc_rt_default" { default = { name = "DefaultRoutingTable", block = "0.0.0.0/0" }
######################
# VPC RT
######################
module "vpc_rt" {
source = "git::https://github.com/virsas/terraform_vpc_rt.git?ref=v1.0.0"
vpc_id = module.vpc_main.id
igw_id = module.vpc_igw.id
rt = var.vpc_rt_default
}