Skip to content

Latest commit

 

History

History
71 lines (54 loc) · 4.73 KB

README.md

File metadata and controls

71 lines (54 loc) · 4.73 KB

vpc and subnets module

This is the documentation for vpc and subnets module.

Summary

This module creates following resources -

  • vpc
  • public and private subnets
  • nat gateways and elastic ips
  • internet gateway
  • public and private subnet route tables

This module only requires you to specify vpc name and vpc cidr block. All the other variables have default values. If the default values are used, this module creates a vpc, 3 public and 3 private subnets, 1 nat gateway per az for each private subnet and corresponding elastic ips, 1 internet gateway for public traffic to public subnets and respective route tables for public and private subnets.

Please read the documentation below to know details about the variables accepted by this module.

Requirements

Name Version
aws 5.6.2

Providers

Name Version
aws 5.6.2

Modules

Name Source Version
vpc_and_subnets terraform-aws-modules/vpc/aws 5.0.0

Resources

Name Type
aws_availability_zones.available data source

Inputs

Name Description Type Default Required
additional_private_subnet_tags Additional tags for the private subnets map(string) {} no
additional_public_subnet_tags Additional tags for the public subnets map(string) {} no
create_igw Controls if an Internet Gateway is created for public subnets and the related routes that connect them. bool true no
enable_dns_hostnames Should be true to enable DNS hostnames in the VPC bool true no
enable_dns_support Should be true to enable DNS support in the VPC bool true no
enable_nat_gateway Should be true if you want to provision NAT Gateways for each of your private networks bool true no
instance_tenancy A tenancy option for instances launched into the VPC string "default" no
name name of the vpc string n/a yes
one_nat_gateway_per_az Should be true if you want only one NAT Gateway per availability zone. bool true no
single_nat_gateway Should be true if you want to provision a single shared NAT Gateway across all of your private networks bool false no
tags A mapping of tags to assign to all resources map(string) {} no
vpc_cidr vpc cidr
e.g. 10.0.0.0/16
string n/a yes

Outputs

Name Description
igw_id The ID of the Internet Gateway
nat_ids List of allocation ID of Elastic IPs created for AWS NAT Gateway
nat_public_ips List of public Elastic IPs created for AWS NAT Gateway
natgw_ids List of NAT Gateway IDs
private_route_table_ids List of IDs of private route tables
private_subnets List of IDs of private subnets
public_route_table_ids List of IDs of public route tables
public_subnets List of IDs of public subnets
vpc_id The ID of the VPC