VPC Networks Module for GCP
The module that creates networks and subnetworks on GCP.
It is primarily intended for Terraform 0.12.x users, because it offers possibility to conditionally handle either new or pre-existing networks/subnetworks without changing the source code. It is useful for 0.12 which doesn't allow conditional module instantiation.
This module is not strictly required for constructing inputs to be passed to other modules (including to vmseries or to autoscale modules). Any existing networks/subnetworks can work equally well, independent on how they were created.
For Terraform 0.13+, a viable alternative is to use Goggle-authored Terraform modules
count parameters when needed.
|terraform||>= 1.2, < 2.0|
|allowed_ports||A list of ports to pass for the ||no|
|allowed_protocol||A protocol (TCP or UDP) to pass for the ||no|
|networks||Map of networks, a minimal example:|
An advanced example:
Terraform 0.12.x and 0.13.x limitation: the existing networks/subnetworks names should be static strings and not come from other
It is allowed from Terraform 0.14 onwards.
|project_id||Project in which to create or look for VPCs and subnets||no|
|region||GCP region for all the created subnetworks and for all the imported subnetworks. Set to null to use a default provider's region.|
To add subnetworks with another region use a separate instance of this module (and specify
|networks_by_key||Map with network objects corresponding to input keys (or index if list was provided) of |
|subnetworks_by_key||Map with subnetwork objects corresponding to input key (or index if list was provided) of |