aws_base
Provision networking (VPC), subnets across AZs, flow logs, NAT, and a default KMS key + log bucket for the environment.
What it does
- Creates a new VPC (or imports an existing one) with public/private subnets across three AZs.
- Adds internet/NAT gateways and route tables for public/private egress.
- Enables VPC flow logs to the log bucket and provisions a default KMS key.
- Creates a log bucket for access/flow logs used by other modules.
Bring your own VPC
To use an existing VPC, set vpc_id, public_subnet_ids, and private_subnet_ids. Public subnets must route to an internet gateway and assign public IPs. Private subnets must route 0.0.0.0/0 to a NAT gateway with a public IP. Misconfigured routes may yield Terraform errors like "No routes matching supplied arguments found in Route Table". IPv6 imports are not validated; dual-stack may work but is not verified.
Providers
Modules
No modules.
Resources
Inputs
| Name | Description | Type |
|---|---|---|
| env_name | Env name | string |
| layer_name | Layer name | string |
| module_name | Module name | string |
| private_ipv4_cidr_blocks | Cidr blocks for private subnets. One for each desired AZ | list(string) |
| private_subnet_ids | List of pre-existing private subnets to use instead of creating new subnets for pltf. Required when var.vpc_id is set. | list(string) |
| public_ipv4_cidr_blocks | Cidr blocks for public subnets. One for each desired AZ | list(string) |
| public_subnet_ids | List of pre-existing public subnets to use instead of creating new subnets for pltf. Required when var.vpc_id is set. | list(string) |
| total_ipv4_cidr_block | Cidr block to reserve for whole vpc | string |
| vpc_id | The ID of an pre-existing VPC to use instead of creating a new VPC for pltf | string |
| vpc_log_retention | n/a | number |
Outputs
| Name | Description |
|---|---|
| db_aws_security_group | n/a |
| documentdb_aws_security_group | n/a |
| elasticache_aws_security_group | n/a |
| kms_account_key_arn | n/a |
| kms_account_key_id | n/a |
| kms_key_alias | n/a |
| private_subnet_ids | n/a |
| public_nat_ips | n/a |
| public_subnets_ids | n/a |
| s3_log_bucket_name | n/a |
| vpc_id | n/a |