Skip to content

nitinda/terraform-module-aws-vpc-route-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Module: terraform-module-aws-vpc-route-table

Terraform module for AWS VPC Routing Table


Code : Stable

This is a stable example. It should successfully build out of the box


General

This module can be used to deploy a VPC Routing Table on AWS Cloud Provider......


Prerequisites

This module needs Terraform 0.12.23 or newer. You can download the latest Terraform version from here.


Features Branches

Below we are able to check the resources that are being created as part of this module call:

  • VPC Routing Table

Usage

Using this repo

To use this module, add the following call to your code:

  • Sample Code:
module "vpc_route_table" {
  source = "git::https://github.com/nitinda/terraform-module-aws-vpc-route-table.git?ref=master"
  
  vpc_id = module.vpc.id
  tags   = {
    Environment = "prod"
    Project     = "POC"
  }
}
module "vpc_route_table" {
  source = "git::https://github.com/nitinda/terraform-module-aws-vpc-route-table.git?ref=master"
  
  vpc_id = module.vpc.id  
  tags   = merge(
    var.common_tags,
    {
      Environment = "prod"
      Name        = "vpc-route-table-public"
    }
  )
}
module "vpc_route_table_private_1a" {
  source = "git::https://github.com/nitinda/terraform-module-aws-vpc-route-table.git?ref=master"
  
  vpc_id = module.vpc.id
  route  = [
    {
      cidr_block     = "0.0.0.0/0"
      nat_gateway_id = module.vpc_nat_gateway_private_1a.id
    }
  ]
  tags   = merge(
    var.common_tags,
    {
      Environment = "prod"
      Name        = "vpc-route-table-private-1a"
    }
  )
}

Inputs

The variables required in order for the module to be successfully called from the deployment repository are the following:

Variable Description Type Argument Status Default Value
vpc_id The VPC ID string Required
route A list of route objects any Optional []
propagating_vgws A list of virtual gateways for propagation any Optional []
tags A mapping of tags to assign to the resource map(string) Optional {}

Outputs

General

This module has the following outputs:

  • id

Usage

In order for the variables to be accessed at module level please use the syntax below:

module.<module_name>.<output_variable_name>

The output variable is able to be accessed through terraform state file using the syntax below:

data.terraform_remote_state.<layer_name>.<output_variable_name>

Authors

Module maintained by Module maintained by the - Nitin Das

About

Terraform module for AWS VPC Routing Table

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages