Skip to content

imajeetyadav/terraform-aws-vpc

Repository files navigation

Simple VPC (Default Configuration)

Resource Count
VPC 1
Public Subnet 2
Private Subnet 2
Internet Gateway 1
NAT gateway 1
Availability Zones 2

Requirements

Name Version
terraform >=1.4
aws >=4.56.0

Providers

Name Version
aws >=4.56.0

Modules

No modules.

Resources

Name Type
aws_eip.nat resource
aws_internet_gateway.igw resource
aws_nat_gateway.nat resource
aws_route_table.private resource
aws_route_table.public resource
aws_route_table_association.private resource
aws_route_table_association.public resource
aws_subnet.private resource
aws_subnet.public resource
aws_vpc.main resource

Inputs

Name Description Type Default Required
availability_zones List of availability zones list(any)
[
"ap-south-1a",
"ap-south-1b"
]
no
cidr The CIDR block for the VPC. string "10.0.0.0/16" no
enable_dns_hostnames Should be true to enable DNS hostnames in the VPC bool false no
enable_dns_support Should be true to enable DNS support in the VPC bool true no
map_public_ip_on_launch Specify true to indicate that instances launched into the subnet should be assigned a public IP address. Default is false bool false no
name the name of your stack string "sample-project" no
private_subnets List of private subnets list(any)
[
"10.0.16.0/20",
"10.0.48.0/20"
]
no
public_subnets List of public subnets list(any)
[
"10.0.0.0/20",
"10.0.32.0/20"
]
no
region the AWS region in which resources are created, you must set the availability_zones variable as well if you define this value to something other than the default string "ap-south-1" no

Outputs

Name Description
private_subnets List of IDs of private subnets
public_subnets List of IDs of public subnets
vpc_enable_dns_hostnames Whether or not the VPC has DNS hostname support
vpc_enable_dns_support Whether or not the VPC has DNS support
vpc_id The ID of the VPC