Skip to content

virsas/terraform_vpc_rt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform_vpc_rt

Terraform module to create VPC routing table in AWS

Variables

# 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

Dependency

VPC https://github.com/virsas/terraform_vpc IGW https://github.com/virsas/terraform_vpc_igw

Terraform example

######################
# 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
}