This module is to create a VPC, Sub-nets and routes for your standard AWS VPC pattern. It also implements the common-tag scheme and calculates the breakdown of your CIDR. This module defaults to creating 3 private subnets and public sub-nets, or optionally less.
Include this repository as a module in your existing terraform code:
module "vpc" {
source = "JamesWoolfenden/vpc/aws"
version = "0.1.21"
cidr = var.cidr
zone = var.zone
common_tags = var.common_tags
account_name = var.account_name
}Using these as your values in your terraform tfvars file:
account_name = "test"
cidr = "10.0.0.0/21"
zone = ["A","B","C"]
common_tags={
AccountType= "Management"
Application= "base"
Environment= "Management"
}| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| account_name | string | n/a | yes | |
| cidr | The range to be associated with the VPC and cleaved into the subnets | string | n/a | yes |
| common_tags | A tagging scheme | map | n/a | yes |
| subnets | The number of subnets required, less than or equal to the number of availability zones | number | "3" |
no |
| zone | Availablity zone names | list | n/a | yes |
| Name | Description |
|---|---|
| private_cidrs | The CIDR ranges for your private subnets |
| private_subnets | The IDs of your private subnets |
| public_cidrs | The CIDR ranges for your public subnets |
| public_subnets | The IDs of your public subnets |
| vpc_id | The ID of your selected VPC |
Check out these related projects.
- terraform-aws-codebuild - Making a Build pipeline
Got a question?
File a GitHub issue.
Please use the issue tracker to report any bugs or file feature requests.

