Merge branch 'master' into gcp_image

This commit is contained in:
Dave Cunningham 2015-02-10 03:25:45 -05:00
commit 3b98bb71e0
6 changed files with 206 additions and 6 deletions

View File

@ -8,7 +8,10 @@ description: |-
# google\_compute\_address
Creates a static IP address resource for Google Compute Engine.
Creates a static IP address resource for Google Compute Engine. For more information see
[the official documentation](https://cloud.google.com/compute/docs/instances-and-network) and
[API](https://cloud.google.com/compute/docs/reference/latest/addresses).
## Example Usage
@ -31,3 +34,4 @@ The following attributes are exported:
* `name` - The name of the resource.
* `address` - The IP address that was allocated.
* `self_link` - The URI of the created resource.

View File

@ -37,6 +37,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.
* `description` - (Optional) Textual description field.
* `network` - (Required) The name of the network to attach this firewall to.
* `allow` - (Required) Can be specified multiple times for each allow

View File

@ -0,0 +1,53 @@
---
layout: "google"
page_title: "Google: google_compute_forwarding_rule"
sidebar_current: "docs-google-resource-forwarding_rule"
description: |-
Manages a Target Pool within GCE.
---
# google\_compute\_forwarding\_rule
Manages a Forwarding Rule within GCE. This binds an ip and port range to a target pool. For more
information see [the official
documentation](https://cloud.google.com/compute/docs/load-balancing/network/forwarding-rules) and
[API](https://cloud.google.com/compute/docs/reference/latest/forwardingRules).
## Example Usage
```
resource "google_compute_forwarding_rule" "default" {
name = "test"
target = "${google_compute_target_pool.default.self_link}"
port_range = "80"
}
```
## Argument Reference
The following arguments are supported:
* `description` - (Optional) Textual description field.
* `ip_address` - (Optional) The static IP. (if not set, an ephemeral IP is
used).
* `ip_protocol` - (Optional) The IP protocol to route, one of "TCP" "UDP" "AH" "ESP" or "SCTP". (default "TCP").
* `name` - (Required) A unique name for the resource, required by GCE. Changing
this forces a new resource to be created.
* `port_range` - (Optional) A range e.g. "1024-2048" or a single port "1024"
(defaults to all ports!).
* `target` - URL of target pool.
## Attributes Reference
The following attributes are exported:
* `self_link` - The URL of the created resource.
* `ip_address` - The IP address that was chosen (or specified).

View File

@ -0,0 +1,57 @@
---
layout: "google"
page_title: "Google: google_compute_http_health_check"
sidebar_current: "docs-google-resource-http_health_check"
description: |-
Manages an HTTP Health Check within GCE.
---
# google\_compute\_http\_health\_check
Manages an HTTP health check within GCE. This is used to monitor instances
behind load balancers. Timeouts or HTTP errors cause the instance to be
removed from the pool. For more information, see [the official
documentation](https://cloud.google.com/compute/docs/load-balancing/health-checks)
and
[API](https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks).
## Example Usage
```
resource "google_compute_http_health_check" "default" {
name = "test"
request_path = "/health_check"
check_interval_sec = 1
timeout_sec = 1
}
```
## Argument Reference
The following arguments are supported:
* `check_interval_sec` - (Optional) How often to poll each instance (default 5).
* `description` - (Optional) Textual description field.
* `healthy_threshold` - (Optional) Consecutive successes required (default 2).
* `host` - (Optional) HTTP host header field (default instance's public ip).
* `name` - (Required) A unique name for the resource, required by GCE.
Changing this forces a new resource to be created.
* `port` - (Optional) TCP port to connect to (default 80).
* `request_path` - (Optional) URL path to query (default /).
* `timeout_sec` - (Optional) How long before declaring failure (default 5).
* `unhealthy_threshold` - (Optional) Consecutive failures required (default 2).
## Attributes Reference
The following attributes are exported:
* `self_link` - The URL of the created resource.

View File

@ -8,7 +8,11 @@ description: |-
# google\_compute\_instance
Manages a VM instance resource within GCE.
Manages a VM instance resource within GCE. For more information see
[the official documentation](https://cloud.google.com/compute/docs/instances)
and
[API](https://cloud.google.com/compute/docs/reference/latest/instances).
## Example Usage
@ -23,8 +27,11 @@ resource "google_compute_instance" "default" {
image = "debian-7-wheezy-v20140814"
}
network {
source = "default"
network_interface {
network = "default"
access_config {
// Ephemeral IP
}
}
metadata {
@ -60,7 +67,11 @@ The following arguments are supported:
* `metadata` - (Optional) Metadata key/value pairs to make available from
within the instance.
* `network` - (Required) Networks to attach to the instance. This can be
* `network_interface` - (Required) Networks to attach to the instance. This can be
specified multiple times for multiple networks. Structure is documented
below.
* `network` - (DEPRECATED, Required) Networks to attach to the instance. This can be
specified multiple times for multiple networks. Structure is documented
below.
@ -82,7 +93,22 @@ The `disk` block supports:
* `type` - (Optional) The GCE disk type.
The `network` block supports:
The `network_interface` block supports:
* `network` - (Required) The name of the network to attach this interface to.
* `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
(this means that ssh provisioners will not work unless you are running Terraform can send traffic to
the instance's network (e.g. via tunnel or because it is running on another cloud instance on that
network). This block can be repeated multiple times. Structure documented below.
The `access_config` block supports:
* `nat_ip` - (Optional) The IP address that will be 1:1 mapped to the instance's network ip. If not
given, one will be generated.
(DEPRECATED) The `network` block supports:
* `source` - (Required) The name of the network to attach this interface to.

View File

@ -0,0 +1,58 @@
---
layout: "google"
page_title: "Google: google_compute_target_pool"
sidebar_current: "docs-google-resource-target_pool"
description: |-
Manages a Target Pool within GCE.
---
# google\_compute\_target\_pool
Manages a Target Pool within GCE. This is a collection of instances used as
target of a network load balancer (Forwarding Rule). For more information see
[the official
documentation](https://cloud.google.com/compute/docs/load-balancing/network/target-pools)
and [API](https://cloud.google.com/compute/docs/reference/latest/targetPools).
## Example Usage
```
resource "google_compute_target_pool" "default" {
name = "test"
instances = [ "us-central1-a/myinstance1", "us-central1-b/myinstance2" ]
health_checks = [ "${google_compute_http_health_check.default.name}" ]
}
```
## Argument Reference
The following arguments are supported:
* `backup_pool` - (Optional) URL to the backup target pool. Must also set
failover\_ratio.
* `description` - (Optional) Textual description field.
* `failover_ratio` - (Optional) Ratio (0 to 1) of failed nodes before using the
backup pool (which must also be set).
* `health_checks` - (Optional) List of zero or one healthcheck names.
* `instances` - (Optional) List of instances in the pool. They can be given as
URLs, or in the form of "zone/name". Note that the instances need not exist
at the time of target pool creation, so there is no need to use the Terraform
interpolators to create a dependency on the instances from the target pool.
* `name` - (Required) A unique name for the resource, required by GCE. Changing
this forces a new resource to be created.
* `session_affinity` - (Optional) How to distribute load. Options are "NONE" (no affinity). "CLIENT\_IP" (hash of the source/dest addresses / ports), and "CLIENT\_IP\_PROTO" also includes the protocol (default "NONE").
## Attributes Reference
The following attributes are exported:
* `self_link` - The URL of the created resource.