This custom AWS VPC module can be used as a template to spin up an AWS VPC in your local environment for testing. The resources also include an EC2 instance attached to the VPCs subnet, with a custom security group.
- VPC with range of 4096 IP addresses.
- Public & Private Subnets in 2 AZs.
- Route Tables (IGW for public and NAT for private).
- Internet Gateway & NAT Gateway
- Secure Security Groups with egress to 443
- Spot EC2 instance in private subnet
module "vpc" {
source = "./modules/vpc"
cidr_block = var.vpc_cidr
vpc_name = var.vpc_name
team = "Research"
cost_centre = "Research Infrastructure"
environment = "Labs"
availability_zones = var.availability_zones
public_subnet_cidrs = var.public_subnet_cidrs
private_subnet_cidrs = var.private_subnet_cidrs
}