multi-az-subnets

cloudposse/multi-az-subnets/aws

Terraform Module HCL AWS

Terraform module for multi-AZ public and private subnets provisioning

Install
module "multi-az-subnets" {
source = "cloudposse/multi-az-subnets/aws"
version = "0.15.0"
}
⭐ Source on GitHub 📦 Registry page
README

terraform-aws-multi-az-subnets ![Latest Release](https://github.com/cloudposse/terraform-aws-multi-az-subnets/releases/latest) ![Slack Community](https://slack.cloudposse.com) [![README Header][readme_header_img]][readme_header_link] [![Cloud Posse][logo]](https://cpco.io/homepage) Terraform module for multi-AZ subnets provisioning. The module creates private and public subnets in the provided Availability Zones. The public subnets are routed to the Internet Gateway specified by var.igw_id. nat_gateway_enabled flag controls the creation of NAT Gateways in the public subnets. The private subnets are routed to the NAT Gateways provided in the var.az_ngw_ids map. If you are creating subnets inside a VPC, consider using cloudposse/terraform-aws-dynamic-subnets instead. --- This project is part

Inputs (34)
NameTypeDescriptionDefault
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["na required
enabledboolSet to false to prevent the module from creating any resources required
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bu required
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` required
tenantstringID element _(Rarely used, not included by default)_. A customer identifier, indi required
label_key_casestringControls the letter case of the `tags` keys (label names) for tags generated by required
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'st required
regex_replace_charsstringTerraform regular expression (regex) string. Characters matching the regex will required
availability_zoneslist(string)List of Availability Zones (e.g. `['us-east-1a', 'us-east-1b', 'us-east-1c']`) required
namestringID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. Thi required
label_value_casestringControls the letter case of ID elements (labels) as included in `id`, set as tag required
cidr_blockstringBase CIDR block which is divided into subnet CIDR blocks (e.g. `10.0.0.0/16`) required
namespacestringID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp' required
ipv6_cidr_blockstringBase IPv6 CIDR block which is divided into /64 subnet CIDR blocks required
id_length_limitnumberLimit `id` to this many characters (minimum 6). Set to `0` for unlimited length. required
vpc_idstringVPC ID required
public_network_acl_idstringNetwork ACL ID that is added to the public subnets. If empty, a new ACL will be ""
private_network_acl_idstringNetwork ACL ID that is added to the private subnets. If empty, a new ACL will be""
public_network_acl_ingresslist(map(string))Egress network ACL rules[ { "action": "allow", "cidr_b
labels_as_tagsset(string)Set of labels (ID elements) to include as tags in the `tags` output. Default is [ "default" ]
descriptor_formatsanyDescribe additional descriptors to be output in the `descriptors` output map. Ma{}
nat_gateway_enabledstringFlag to enable/disable NAT Gateways creation in public subnets"true"
ipv6_enabledboolFlag to enable/disable IPv6 creation in public subnetsfalse
typestringType of subnets to create (`private` or `public`)"private"
az_ngw_idsmap(string)Only for private subnets. Map of AZ names to NAT Gateway IDs that are used as de{}
private_network_acl_ingresslist(map(string))Egress network ACL rules[ { "action": "allow", "cidr_b
additional_tag_mapmap(string)Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add{}
private_network_acl_egresslist(map(string))Egress network ACL rules[ { "action": "allow", "cidr_b
contextanySingle object for setting entire context at once. See description of individual { "additional_tag_map": {}, "attribu
max_subnetsstringMaximum number of subnets that can be created. The variable is used for CIDR blo"6"
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
igw_idstringInternet Gateway ID that is used as a default route when creating public subnets""
public_network_acl_egresslist(map(string))Egress network ACL rules[ { "action": "allow", "cidr_b
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
Outputs (7)
az_route_table_ids — Map of AZ names to Route Table IDs
az_ngw_ids — Map of AZ names to NAT Gateway IDs (only for public subnets)
az_subnet_map — Map of AZ names to map of information about subnets
az_subnet_ids — Map of AZ names to subnet IDs
az_subnet_arns — Map of AZ names to subnet ARNs
az_subnet_cidr_blocks — Map of AZ names to subnet CIDR blocks
az_subnet_ipv6_cidr_blocks — Map of AZ names to subnet IPv6 CIDR blocks
Resources (7)
aws_eipaws_nat_gatewayaws_network_aclaws_routeaws_route_tableaws_route_table_associationaws_subnet
Details
FrameworkTerraform Module
LanguageHCL
Version0.15.0
Cloud AWS
★ Stars99
Forks72
Total downloads458.7k
Inputs34
Outputs7
Resources7
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated