Module library

VPC

Terraform module to create AWS VPC resources

Version
Submodules
flow-logvpc-endpoints

Inputs

40 / 236
amazon_side_asnoptionalstring

The Autonomous System Number (ASN) for the Amazon side of the gateway. By default the virtual private gateway is created with the current default Amazon ASN

Default64512
azsoptionallist(string)

A list of availability zones names or ids in the region

Default[]
cidroptionalstring

(Optional) The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using `ipv4_netmask_length` & `ipv4_ipam_pool_id`

Default10.0.0.0/16
create_database_internet_gateway_routeoptionalbool

Controls if an internet gateway route for public database access should be created

Defaultfalse
create_database_nat_gateway_routeoptionalbool

Controls if a nat gateway route should be created to give internet access to the database subnets

Defaultfalse
create_database_subnet_groupoptionalbool

Controls if database subnet group should be created (n.b. database_subnets must also be set)

Defaulttrue
create_database_subnet_route_tableoptionalbool

Controls if separate route table for database should be created

Defaultfalse
create_egress_only_igwoptionalbool

Controls if an Egress Only Internet Gateway is created and its related routes

Defaulttrue
create_elasticache_subnet_groupoptionalbool

Controls if elasticache subnet group should be created

Defaulttrue
create_elasticache_subnet_route_tableoptionalbool

Controls if separate route table for elasticache should be created

Defaultfalse
create_flow_log_cloudwatch_iam_roleoptionalbool

Whether to create IAM role for VPC Flow Logs

Defaultfalse
create_flow_log_cloudwatch_log_groupoptionalbool

Whether to create CloudWatch log group for VPC Flow Logs

Defaultfalse
create_igwoptionalbool

Controls if an Internet Gateway is created for public subnets and the related routes that connect them

Defaulttrue
create_multiple_intra_route_tablesoptionalbool

Indicates whether to create a separate route table for each intra subnet. Default: `false`

Defaultfalse
create_multiple_public_route_tablesoptionalbool

Indicates whether to create a separate route table for each public subnet. Default: `false`

Defaultfalse
create_private_nat_gateway_routeoptionalbool

Controls if a nat gateway route should be created to give internet access to the private subnets

Defaulttrue
create_redshift_subnet_groupoptionalbool

Controls if redshift subnet group should be created

Defaulttrue
create_redshift_subnet_route_tableoptionalbool

Controls if separate route table for redshift should be created

Defaultfalse
create_vpcoptionalbool

Controls if VPC should be created (it affects almost all resources)

Defaulttrue
customer_gateway_tagsoptionalmap(string)

Additional tags for the Customer Gateway

Default{}
customer_gatewaysoptionalmap(map(any))

Maps of Customer Gateway's attributes (BGP ASN and Gateway's Internet-routable external IP address)

Default{}
customer_owned_ipv4_pooloptionalstring

The customer owned IPv4 address pool. Typically used with the `map_customer_owned_ip_on_launch` argument. The `outpost_arn` argument must be specified when configured

Defaultnull
database_acl_tagsoptionalmap(string)

Additional tags for the database subnets network ACL

Default{}
database_dedicated_network_acloptionalbool

Whether to use dedicated network ACL (not default) and custom rules for database subnets

Defaultfalse
database_inbound_acl_rulesoptionallist(map(string))

Database subnets inbound network ACL rules

Default[…]
database_outbound_acl_rulesoptionallist(map(string))

Database subnets outbound network ACL rules

Default[…]
database_route_table_tagsoptionalmap(string)

Additional tags for the database route tables

Default{}
database_subnet_assign_ipv6_address_on_creationoptionalbool

Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address. Default is `false`

Defaultfalse
database_subnet_enable_dns64optionalbool

Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations. Default: `true`

Defaulttrue
database_subnet_enable_resource_name_dns_a_record_on_launchoptionalbool

Indicates whether to respond to DNS queries for instance hostnames with DNS A records. Default: `false`

Defaultfalse
database_subnet_enable_resource_name_dns_aaaa_record_on_launchoptionalbool

Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. Default: `true`

Defaulttrue
database_subnet_group_nameoptionalstring

Name of database subnet group

Defaultnull
database_subnet_group_tagsoptionalmap(string)

Additional tags for the database subnet group

Default{}
database_subnet_ipv6_nativeoptionalbool

Indicates whether to create an IPv6-only subnet. Default: `false`

Defaultfalse
database_subnet_ipv6_prefixesoptionallist(string)

Assigns IPv6 database subnet id based on the Amazon provided /56 prefix base 10 integer (0-256). Must be of equal length to the corresponding IPv4 subnet list

Default[]
database_subnet_namesoptionallist(string)

Explicit values to use in the Name tag on database subnets. If empty, Name tags are generated

Default[]
database_subnet_private_dns_hostname_type_on_launchoptionalstring

The type of hostnames to assign to instances in the subnet at launch. For IPv6-only subnets, an instance DNS name must be based on the instance ID. For dual-stack and IPv4-only subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: `ip-name`, `reso…

Defaultnull
database_subnet_suffixoptionalstring

Suffix to append to database subnets name

Defaultdb
database_subnet_tagsoptionalmap(string)

Additional tags for the database subnets

Default{}
database_subnetsoptionallist(string)

A list of database subnets inside the VPC

Default[]

All 236 are optional — the module deploys with none of them set. Showing 40, so the site stays a static download — the remaining 196 are in the source.

Outputs

40 / 119
azs

A list of availability zones specified as argument to this module

cgw_arns

List of ARNs of Customer Gateway

cgw_ids

List of IDs of Customer Gateway

database_internet_gateway_route_id

ID of the database internet gateway route

database_ipv6_egress_route_id

ID of the database IPv6 egress route

database_nat_gateway_route_ids

List of IDs of the database nat gateway route

database_network_acl_arn

ARN of the database network ACL

database_network_acl_id

ID of the database network ACL

database_route_table_association_ids

List of IDs of the database route table association

database_route_table_ids

List of IDs of database route tables

database_subnet_arns

List of ARNs of database subnets

database_subnet_group

ID of database subnet group

database_subnet_group_name

Name of database subnet group

database_subnet_objects

A list of all database subnets, containing the full objects.

database_subnets

List of IDs of database subnets

database_subnets_cidr_blocks

List of cidr_blocks of database subnets

database_subnets_ipv6_cidr_blocks

List of IPv6 cidr_blocks of database subnets in an IPv6 enabled VPC

default_network_acl_id

The ID of the default network ACL

default_route_table_id

The ID of the default route table

default_security_group_id

The ID of the security group created by default on VPC creation

default_vpc_arn

The ARN of the Default VPC

default_vpc_cidr_block

The CIDR block of the Default VPC

default_vpc_default_network_acl_id

The ID of the default network ACL of the Default VPC

default_vpc_default_route_table_id

The ID of the default route table of the Default VPC

default_vpc_default_security_group_id

The ID of the security group created by default on Default VPC creation

default_vpc_enable_dns_hostnames

Whether or not the Default VPC has DNS hostname support

default_vpc_enable_dns_support

Whether or not the Default VPC has DNS support

default_vpc_id

The ID of the Default VPC

default_vpc_instance_tenancy

Tenancy of instances spin up within Default VPC

default_vpc_main_route_table_id

The ID of the main route table associated with the Default VPC

dhcp_options_id

The ID of the DHCP options

egress_only_internet_gateway_id

The ID of the egress only Internet Gateway

elasticache_network_acl_arn

ARN of the elasticache network ACL

elasticache_network_acl_id

ID of the elasticache network ACL

elasticache_route_table_association_ids

List of IDs of the elasticache route table association

elasticache_route_table_ids

List of IDs of elasticache route tables

elasticache_subnet_arns

List of ARNs of elasticache subnets

elasticache_subnet_group

ID of elasticache subnet group

elasticache_subnet_group_name

Name of elasticache subnet group

elasticache_subnet_objects

A list of all elasticache subnets, containing the full objects.

What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else. Showing 40 of 119 — the rest are in the source.