Update google resources where necessary to make use of subnetworks, update som docs

This commit is contained in:
Matt Morrison 2016-02-15 16:17:55 +13:00 committed by James Nugent
parent 4a5f5cf2da
commit b60e587750
3 changed files with 64 additions and 3 deletions

View File

@ -120,7 +120,12 @@ the type is "local-ssd", in which case scratch must be true).
The `network_interface` block supports:
* `network` - (Required) The name of the network to attach this interface to.
* `network` - (Optional) The name 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 to. The subnetwork
must exist in the same region this instance is to be created in. Either `network`
or `subnetwork` must be provided.
* `access_config` - (Optional) Access configurations, i.e. IPs via which this instance can be
accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet

View File

@ -26,8 +26,17 @@ 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` - (Required) The IPv4 address range that machines in this
network are assigned to, represented as a CIDR block.
* `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 of `auto_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, and `ipv4_range` is not set, a custom subnetted
network will be created that can support `google_compute_subnetwork`
resources.
## Attributes Reference

View File

@ -0,0 +1,47 @@
---
layout: "google"
page_title: "Google: google_compute_subnetwork"
sidebar_current: "docs-google-compute-subnetwork"
description: |-
Manages a subnetwork within GCE.
---
# google\_compute\_subnetwork
Manages a subnetwork within GCE.
## Example Usage
```
resource "google_compute_subnetwork" "default-us-east1" {
name = "default-us-east1"
ip_cidr_range = "10.0.0.0/16"
network = "${google_compute_network.default.self_link}"
region = "us-east1"
}
```
## 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.
* `network` - (Required) A link to the parent network of this subnetwork.
The parent network must have been created in custom subnet mode.
* `ip_cidr_range` - (Required) The IP address range that machines in this
network are assigned to, represented as a CIDR block.
* `region` - (Required) The region this subnetwork will be created in.
* `description` - (Optional) Description of this subnetwork.
## Attributes Reference
The following attributes are exported:
* `name` - The name of the resource.
* `ip_cidr_range` - The CIDR block of this network.
* `gateway_address` - The IP address of the gateway.