A Terraform module for an AWS Virtual Private Cloud (VPC), with included subnets, route tables, NACLs, and internet/ nat gateways
Name | Version |
---|---|
terraform | ~>1.3 |
aws | ~>3.6 |
tls | ~>4.0 |
Name | Version |
---|---|
aws | ~>3.6 |
tls | ~>4.0 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
assign_generated_ipv6_cidr_block | Whether to request a /56 IPv6 CIDR block for the VPC | bool |
false |
no |
availability_zones | Availability zones to distribute resources within | list(string) |
n/a | yes |
bastion | Configurations for bastion hosts in this VPC | object({ |
{ |
no |
cidr_block | A CIDR block to assign to the VPC | string |
n/a | yes |
dhcp | Configurations for DHCP options for this VPC | object({ |
{} |
no |
enable_classiclink | Whether or not to enable ClassicLink for the VPC | bool |
false |
no |
enable_classiclink_dns_support | Whether or not to enable ClassicLink DNS support for the VPC | bool |
false |
no |
enable_dns_hostnames | Whether or not to enable internal DNS hostnames within the VPC | bool |
true |
no |
enable_dns_support | Whether or not to enable internal DNS support within the VPC | bool |
true |
no |
instance_tenancy | default, dedicated, or host. Determines tenancy of instances launched within the VPC | string |
"default" |
no |
internet_gateway | Configurations for the internet gateway used by this VPC | object({ |
{} |
no |
name | The name of the VPC, and the prefix for resources created within the VPC | string |
n/a | yes |
nat_gateway_subnets | Configuration options for the subnets created to house Nat Gateway attachment network interfaces | object({ |
{ |
no |
route53_resolver_rule_associations | Route 53 Resolver rules to associate with this VPC | list(string) |
[] |
no |
secondary_ipv4_cidr_blocks | Additional IPv4 CIDR blocks to assign to the VPC | list(object({ |
[] |
no |
subnet_groups | Configurations for groups of subnets. For each group, one subnet will be created in each availability zone. Each subnet in a group will share a common network ACL. If the subnet group type is 'private', routes to a nat gateway will be created. If the subnet group type is 'public', routes to an internet gateway will be created. If the subnet group type is 'airgapped', neither will be created. |
list(object({ |
[] |
no |
tags | Tags to assign to the VPC | map(string) |
{} |
no |
transit_gateway_attachments | Attachments to transit gateways from this VPC | list(object({ |
[] |
no |
transit_gateway_subnets | Configuration options for the subnets created to house Transit Gateway attachment network interfaces | object({ |
{} |
no |
vpc_endpoint_subnets | Configuration options for the subnets created to house VPC endpoints | object({ |
{} |
no |
vpc_endpoints | VPC endpoints to create within this VPC | list(object({ |
[] |
no |
vpc_peering_connection_accepters | Accepters for vpc peering connections that originate elsewhere | list(object({ |
[] |
no |
vpc_peering_connections | Peering connections to make to VPCs elsewhere from this VPC | list(object({ |
[] |
no |
Name | Description |
---|---|
assign_generated_ipv6_cidr_block | The value provided for var.assign_generated_ipv6_cidr_block |
aws_caller_id | The AWS caller identity used to build the module |
bastion | The value provided for var.bastion |
bastion_ec2_key | The EC2 keypair created to provide access to the bastion hosts in this VPC |
bastion_instances | The ec2 instaces created as bastion hosts in this VPC |
bastion_security_group | The security group created for the bastion hosts in this VPC |
bastion_ssh_key | The tls key created to provide access to the bastions, if one was not provided |
cidr_block | The value provided for var.cidr_block |
dhcp | The value provided for var.dhcp |
dhcp_options | The DHCP options configured for the VPC |
enable_classiclink | The provided value for var.enable_classiclink |
enable_classiclink_dns_support | The provided value for var.enable_classiclink_dns_support |
enable_dns_hostnames | The provided value for var.enable_dns_hostnames |
enable_dns_support | The provided value for var.enable_dns_support |
instance_tenancy | The provided value for var.instance_tenancy |
internet_gateway | The internet gateway created for this VPC |
nacls | Network ACLs created for subnet groups in this VPC |
nacls_by_group | Network ACLs created for subnet groups in this VPC, nested by group (ex. module.my_vpc.nacls_by_group["my-group"].arn) |
name | The value provided for var.name |
nat_gateway | The nat gateways used by this VPC |
nat_gateway_eip | The elastic IP addresses used by the nat gateways in this VPC |
nat_gateway_nacl | The NACL that manages ingress and egress to the nat gateways for this VPC |
nat_gateway_route_table | The route table used by the nat gateways in this VPC |
nat_gateway_subnets | The subnets containing the nat gateways in this VPC |
region | The region containing the vpc |
route53_resolver_rule_associations | The value provided for var.route53_resolver_rule_associations |
route_tables | Route tables created for this VPC |
route_tables_by_group | Route tables created for this VPC. Nested by group and AZ (ex. module.my_vpc.route_tables_by_group["my-group"]["us-west-1a"].arn) for private subnet groups, and nested by group (ex. module.my_vpc.route_tables_by_group["my-group"].arn) for public and airgapped subnet groups |
secondary_ipv4_cidr_blocks | The value provided for var.secondary_ipv4_cidr_blocks |
subnet_groups | The provided value for var.subnet_groups |
subnets | Subnets created in this VPC |
subnets_by_group | Subnets created in this VPC, nested by group and AZ (ex. module.my_vpc.subnets_by_group["my-group"]["us-west-1a"].arn) |
tags | Tags assigned to the VPC |
transit_gateway_attachments | Attachments to transit gateways from this VPC |
transit_gateway_nacl | The NACL used by the transit gateway subnets |
transit_gateway_route_table | The route table for the transit gateway subnets |
transit_gateway_subnets | The subnets created for Transit Gateway attachment network interfaces |
vpc | The VPC resource object |
vpc_endpoint_nacl | The NACL used by the VPC endpoint subnets |
vpc_endpoint_route_table | The route table used by the VPC endpoint subnets |
vpc_endpoint_security_group | The security group used by the VPC endpoints in this VPC |
vpc_endpoint_subnets | The subnets that house VPC endpoints in this VPC |
vpc_endpoints | VPC endpoints created within this VPC |
vpc_peering_connection_accepters | VPC peering connections accepted by this VPC |
vpc_peering_connections | VPC peering connections originating from this VPC |