-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 #3230
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1119,11 +1119,26 @@ overrides: !ruby/object:Overrides::ResourceOverrides | |
vars: | ||
group_name: "soletenant-group" | ||
template_name: "soletenant-tmpl" | ||
- !ruby/object:Provider::Terraform::Examples | ||
name: "node_group_autoscaling_policy" | ||
min_version: beta | ||
primary_resource_id: "nodes" | ||
vars: | ||
group_name: "soletenant-group" | ||
template_name: "soletenant-tmpl" | ||
properties: | ||
zone: !ruby/object:Overrides::Terraform::PropertyOverride | ||
required: false | ||
default_from_api: true | ||
custom_flatten: 'templates/terraform/custom_flatten/name_from_self_link.erb' | ||
autoscalingPolicy: !ruby/object:Overrides::Terraform::PropertyOverride | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do these need to all be O+C? Is the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah the block was returning from the API in the basic test without If the block IS defined, |
||
default_from_api: true | ||
autoscalingPolicy.mode: !ruby/object:Overrides::Terraform::PropertyOverride | ||
default_from_api: true | ||
autoscalingPolicy.minNodes: !ruby/object:Overrides::Terraform::PropertyOverride | ||
default_from_api: true | ||
autoscalingPolicy.maxNodes: !ruby/object:Overrides::Terraform::PropertyOverride | ||
default_from_api: true | ||
NodeTemplate: !ruby/object:Overrides::Terraform::ResourceOverride | ||
examples: | ||
- !ruby/object:Provider::Terraform::Examples | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
data "google_compute_node_types" "central1a" { | ||
provider = google-beta | ||
zone = "us-central1-a" | ||
} | ||
|
||
resource "google_compute_node_template" "soletenant-tmpl" { | ||
provider = google-beta | ||
name = "<%= ctx[:vars]['template_name'] %>" | ||
region = "us-central1" | ||
node_type = data.google_compute_node_types.central1a.names[0] | ||
} | ||
|
||
resource "google_compute_node_group" "<%= ctx[:primary_resource_id] %>" { | ||
provider = google-beta | ||
name = "<%= ctx[:vars]['group_name'] %>" | ||
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 | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little awkwardly worded. Maybe "Minimum size of the node group. Must be an ..."