Allow provisioning multiple subnets per AZ (the number of subnets per AZ is specified in the subnets_per_az_count variable). If subnets_per_az_count is set to 1 (default), it's backwards compatible with the previous functionality (one subnet of each type, private and public, per AZ)
Allow named subnets (specified in the subnets_per_az_names variable)
why
Multiple subnets per AZ are useful in many cases:
In a VPC, provision a dedicated subnet for services, backend and database
For AWS Network Firewall, a dedicated subnet in each AZ is required. When a Transit Gateway is used, we provision tgw subnet and firewall subnets in each AZ
Named subnets are useful to easily find particular subnets IDs and route table IDs (both public and private) from the module outputs, e.g. to find all subnets and route tables for tgw, firewall, database, services, backend, etc.
what
subnets_per_az_count
variable). Ifsubnets_per_az_count
is set to1
(default), it's backwards compatible with the previous functionality (one subnet of each type, private and public, per AZ)subnets_per_az_names
variable)why
tgw
subnet andfirewall
subnets in each AZtgw
,firewall
,database
,services
,backend
, etc.test
Using the following settings:
The outputs: