mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-05 17:52:38 +00:00
Use new autoscaler / instance group manager APIs.
This commit is contained in:
parent
24d99f55aa
commit
7930789fcb
|
@ -1,15 +1,12 @@
|
|||
---
|
||||
layout: "google"
|
||||
page_title: "Google: google_autoscaler"
|
||||
sidebar_current: "docs-google-resource-autoscaler"
|
||||
page_title: "Google: google_compute_autoscaler"
|
||||
sidebar_current: "docs-google-resource-compute-autoscaler"
|
||||
description: |-
|
||||
Managers an Instance Group within GCE.
|
||||
Manages an Autoscaler within GCE.
|
||||
---
|
||||
|
||||
# google\_autoscaler
|
||||
|
||||
**Note**: This resource is in
|
||||
[beta](https://cloud.google.com/terms/launch-stages).
|
||||
# google\_compute\_autoscaler
|
||||
|
||||
A Compute Engine Autoscaler automatically adds or removes virtual machines from
|
||||
a managed instance group based on increases or decreases in load. This allows
|
||||
|
@ -51,7 +48,7 @@ resource "google_compute_target_pool" "foobar" {
|
|||
name = "foobar"
|
||||
}
|
||||
|
||||
resource "google_replicapool_instance_group_manager" "foobar" {
|
||||
resource "google_compute_instance_group_manager" "foobar" {
|
||||
name = "foobar"
|
||||
instance_template = "${google_compute_instance_template.foobar.self_link}"
|
||||
target_pools = ["${google_compute_target_pool.foobar.self_link}"]
|
||||
|
@ -59,10 +56,10 @@ resource "google_replicapool_instance_group_manager" "foobar" {
|
|||
zone = "us-central1-f"
|
||||
}
|
||||
|
||||
resource "google_autoscaler" "foobar" {
|
||||
resource "google_compute_autoscaler" "foobar" {
|
||||
name = "foobar"
|
||||
zone = "us-central1-f"
|
||||
target = "${google_replicapool_instance_group_manager.foobar.self_link}"
|
||||
target = "${google_compute_instance_group_manager.foobar.self_link}"
|
||||
autoscaling_policy = {
|
||||
max_replicas = 5
|
||||
min_replicas = 1
|
|
@ -1,15 +1,12 @@
|
|||
---
|
||||
layout: "google"
|
||||
page_title: "Google: google_replicapool_instance_group_manager"
|
||||
sidebar_current: "docs-google-resource-instance_group_manager"
|
||||
page_title: "Google: google_compute_instance_group_manager"
|
||||
sidebar_current: "docs-google-resource-compute-instance_group_manager"
|
||||
description: |-
|
||||
Manages an Instance Group within GCE.
|
||||
---
|
||||
|
||||
# google\_replicapool\_instance\_group\_manager
|
||||
|
||||
**Note**: This resource is in
|
||||
[beta](https://cloud.google.com/terms/launch-stages).
|
||||
# google\_compute\_instance\_group\_manager
|
||||
|
||||
The Google Compute Engine Instance Group Manager API creates and manages pools
|
||||
of homogeneous Compute Engine virtual machine instances from a common instance
|
||||
|
@ -19,7 +16,7 @@ and [API](https://cloud.google.com/compute/docs/instance-groups/manager/v1beta2/
|
|||
## Example Usage
|
||||
|
||||
```
|
||||
resource "google_replicapool_instance_group_manager" "foobar" {
|
||||
resource "google_compute_instance_group_manager" "foobar" {
|
||||
description = "Terraform test instance group manager"
|
||||
name = "terraform-test"
|
||||
instance_template = "${google_compute_instance_template.foobar.self_link}"
|
||||
|
@ -63,6 +60,6 @@ affect existing instances.
|
|||
|
||||
The following attributes are exported:
|
||||
|
||||
* `group` - The full URL of the instance group created by the manager.
|
||||
* `instance_group` - The full URL of the instance group created by the manager.
|
||||
|
||||
* `self_link` - The URL of the created resource.
|
Loading…
Reference in New Issue
Block a user