This submodule is part of the the terraform-google-network
module. It creates a vpc network and optionally enables it as a Shared VPC host project.
It supports creating:
- A VPC Network
- Optionally enabling the network as a Shared VPC host
Basic usage of this submodule is as follows:
module "vpc" {
source = "terraform-google-modules/network/google//modules/vpc"
version = "~> 2.0.0"
project_id = "<PROJECT ID>"
network_name = "example-vpc"
shared_vpc_host = false
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
auto_create_subnetworks | When set to true, the network is created in 'auto subnet mode' and it will create a subnet for each region automatically across the 10.128.0.0/9 address range. When set to false, the network is created in 'custom subnet mode' so the user can explicitly connect subnetwork resources. | bool |
false |
no |
delete_default_internet_gateway_routes | If set, ensure that all routes within the network specified whose names begin with 'default-route' and with a next hop of 'default-internet-gateway' are deleted | bool |
false |
no |
description | An optional description of this resource. The resource must be recreated to modify this field. | string |
"" |
no |
enable_ipv6_ula | Enabled IPv6 ULA, this is a permenant change and cannot be undone! (default 'false') | bool |
false |
no |
internal_ipv6_range | When enabling IPv6 ULA, optionally, specify a /48 from fd20::/20 (default null) | string |
null |
no |
mtu | The network MTU (If set to 0, meaning MTU is unset - defaults to '1460'). Recommended values: 1460 (default for historic reasons), 1500 (Internet default), or 8896 (for Jumbo packets). Allowed are all values in the range 1300 to 8896, inclusively. | number |
0 |
no |
network_firewall_policy_enforcement_order | Set the order that Firewall Rules and Firewall Policies are evaluated. Valid values are BEFORE_CLASSIC_FIREWALL and AFTER_CLASSIC_FIREWALL . (default null or equivalent to AFTER_CLASSIC_FIREWALL ) |
string |
null |
no |
network_name | The name of the network being created | string |
n/a | yes |
network_profile | "A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: * https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name} * projects/{projectId}/global/networkProfiles/{network_profile_name} |
string |
null |
no |
project_id | The ID of the project where this VPC will be created | string |
n/a | yes |
routing_mode | The network routing mode (default 'GLOBAL') | string |
"GLOBAL" |
no |
shared_vpc_host | Makes this project a Shared VPC host if 'true' (default 'false') | bool |
false |
no |
Name | Description |
---|---|
network | The VPC resource being created |
network_id | The ID of the VPC being created |
network_name | The name of the VPC being created |
network_self_link | The URI of the VPC being created |
project_id | VPC project id |