Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node group autoscaling policy #5864

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3230.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
compute: Added `autoscaling_policy` to `google_compute_node_group`
```
36 changes: 36 additions & 0 deletions website/docs/r/compute_node_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,42 @@ resource "google_compute_node_group" "nodes" {
node_template = google_compute_node_template.soletenant-tmpl.self_link
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=node_group_autoscaling_policy&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Node Group Autoscaling Policy


```hcl
data "google_compute_node_types" "central1a" {
provider = google-beta
zone = "us-central1-a"
}

resource "google_compute_node_template" "soletenant-tmpl" {
provider = google-beta
name = "soletenant-tmpl"
region = "us-central1"
node_type = data.google_compute_node_types.central1a.names[0]
}

resource "google_compute_node_group" "nodes" {
provider = google-beta
name = "soletenant-group"
zone = "us-central1-a"
description = "example google_compute_node_group for Terraform Google Provider"

size = 1
node_template = google_compute_node_template.soletenant-tmpl.self_link
autoscaling_policy {
mode = "ON"
min_nodes = 1
max_nodes = 10
}
}
```

## Argument Reference

Expand Down