All Modules
AWSNetworking

VPC

VPC with public/private subnets, NAT Gateway, and optional EKS tagging

Usage

module "vpc" {
  source = "github.com/fencepencil/fencepencil-aws-modules//vpc"

  name = "<name>"
  availability_zones = ["<value>"]
  private_subnet_cidrs = ["<value>"]
  public_subnet_cidrs = ["<value>"]

  tags = var.tags
}

Inputs (9)

NameTypeDescriptionDefaultRequired
namestringName for the VPC and resource prefixyes
vpc_cidrstringCIDR block for the VPC10.0.0.0/16no
availability_zoneslist(string)List of availability zonesyes
private_subnet_cidrslist(string)CIDR blocks for private subnetsyes
public_subnet_cidrslist(string)CIDR blocks for public subnetsyes
enable_nat_gatewayboolEnable NAT Gateway for private subnetstrueno
single_nat_gatewayboolUse a single NAT Gateway (cost savings)trueno
enable_eks_tagsboolAdd kubernetes.io tags for EKS auto-discoveryfalseno
tagsmap(string)Tags to apply to all resources{}no

Outputs (5)

NameDescription
vpc_idThe ID of the VPC
vpc_cidr_blockThe CIDR block of the VPC
private_subnet_idsList of private subnet IDs
public_subnet_idsList of public subnet IDs
nat_gateway_idsList of NAT Gateway IDs

More AWS Modules

Browse our full library of AWS infrastructure modules.

View all AWS modules