1.3 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
Google: google_compute_network | docs-google-compute-network | Manages a network within GCE. |
google_compute_network
Manages a network within GCE.
Example Usage
resource "google_compute_network" "default" {
name = "test"
ipv4_range = "10.0.0.0/16"
}
Argument Reference
The following arguments are supported:
-
name
- (Required) A unique name for the resource, required by GCE. Changing this forces a new resource to be created. -
ipv4_range
- (Optional) The IPv4 address range that machines in this network are assigned to, represented as a CIDR block. If not set, an auto or custom subnetted network will be created, depending on the value ofauto_create_subnetworks
attribute. -
auto_create_subnetworks
- (Optional) If set to true, this network will be created in auto subnet mode, and Google will create a subnet for each region automatically. If set to false, andipv4_range
is not set, a custom subnetted network will be created that can supportgoogle_compute_subnetwork
resources.
Attributes Reference
The following attributes are exported:
name
- The name of the resource.ipv4_range
- The CIDR block of this network.gateway_ipv4
- The IPv4 address of the gateway.