Make network attribute more consistent.

Some google resources required network be refernced by resource URL (aka self_link), while others required network name.
This change allows either to be supplied.

DRY it out, and add a fix for #5552.
This commit is contained in:
Matt Morrison 2016-09-03 21:51:20 +12:00
parent f2710cf1ba
commit 44bb890f57
6 changed files with 9 additions and 8 deletions

View File

@ -133,7 +133,7 @@ the type is "local-ssd", in which case scratch must be true).
The `network_interface` block supports:
* `network` - (Optional) The name of the network to attach this interface to.
* `network` - (Optional) The name or self_link of the network to attach this interface to.
Either `network` or `subnetwork` must be provided.
* `subnetwork` - (Optional) the name of the subnetwork to attach this interface

View File

@ -192,7 +192,7 @@ The `disk` block supports:
The `network_interface` block supports:
* `network` - (Optional) The name of the network to attach this interface to.
* `network` - (Optional) The name or self_link of the network to attach this interface to.
Use `network` attribute for Legacy or Auto subnetted networks and
`subnetwork` for custom subnetted networks.

View File

@ -37,7 +37,7 @@ 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.
* `network` - (Required) The name of the network to attach this route to.
* `network` - (Required) The name or self_link of the network to attach this route to.
* `priority` - (Required) The priority of this route, used to break ties.

View File

@ -31,8 +31,9 @@ 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.
* `network` - (Required) A link to the parent network of this subnetwork.
The parent network must have been created in custom subnet mode.
* `network` - (Required) The network name or resource link to the parent
network of this subnetwork. The parent network must have been created
in custom subnet mode.
- - -

View File

@ -89,8 +89,8 @@ 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.
* `network` - (Required) A link to the network this VPN gateway is accepting
traffic for. Changing this forces a new resource to be created.
* `network` - (Required) The name or resource link to the network this VPN gateway
is accepting traffic for. Changing this forces a new resource to be created.
- - -

View File

@ -66,7 +66,7 @@ resource "google_container_cluster" "primary" {
`monitoring.googleapis.com` and `none`. Defaults to
`monitoring.googleapis.com`
* `network` - (Optional) The name of the Google Compute Engine network to which
* `network` - (Optional) The name or self_link of the Google Compute Engine network to which
the cluster is connected
* `node_config` - (Optional) The machine type and image to use for all nodes in