support/ docs/ terraform-aws-vpc
terraform-aws-vpc
A VPC with public and private subnets across availability zones, NAT gateways and flow logs.
View source on GitHub ↗Usage
module "vpc" {
source = "github.com/GremlinLTD/terraform-aws-vpc?ref=v1.2.0"
cidr_block = "10.0.0.0/16"
azs = ["eu-west-2a", "eu-west-2b", "eu-west-2c"]
enable_nat = true
} Requirements
Terraform>= 1.6
AWS provider>= 5.0
Inputs
NameTypeDefaultDescription
cidr_block CIDR range for the VPC.
azs Availability zones to spread subnets across.
enable_nat Create a NAT gateway per zone for private subnets.
flow_logs Send VPC flow logs to CloudWatch.
tags Tags added to every resource.
Outputs
vpc_idID of the VPC.
public_subnet_idsIDs of the public subnets.
private_subnet_idsIDs of the private subnets.
Changelog
1.2.0Adds optional flow logs to S3.
1.1.0NAT gateways can be shared across zones to save cost.
1.0.0First stable release.
Found a bug? Open an issue on the repository, or contact us.