This is the documentation for vpc and subnets module.
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.
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 |