diff --git a/mmv1/products/compute/NodeGroup.yaml b/mmv1/products/compute/NodeGroup.yaml index fbc77e550ea5..c8ba31a1074a 100644 --- a/mmv1/products/compute/NodeGroup.yaml +++ b/mmv1/products/compute/NodeGroup.yaml @@ -51,6 +51,13 @@ examples: vars: group_name: 'soletenant-group' template_name: 'soletenant-tmpl' + - !ruby/object:Provider::Terraform::Examples + name: 'node_group_maintenance_interval' + min_version: beta + primary_resource_id: 'nodes' + vars: + group_name: 'soletenant-group' + template_name: 'soletenant-tmpl' - !ruby/object:Provider::Terraform::Examples name: 'node_group_autoscaling_policy' primary_resource_id: 'nodes' @@ -196,3 +203,14 @@ properties: required: true description: | The project id/number should be the same as the key of this project config in the project map. + - !ruby/object:Api::Type::Enum + name: 'maintenanceInterval' + min_version: beta + description: | + Specifies the frequency of planned maintenance events. Set to one of the following: + - AS_NEEDED: Hosts are eligible to receive infrastructure and hypervisor updates as they become available. + - RECURRENT: Hosts receive planned infrastructure and hypervisor updates on a periodic basis, but not more frequently than every 28 days. This minimizes the number of planned maintenance operations on individual hosts and reduces the frequency of disruptions, both live migrations and terminations, on individual VMs. + values: + - :AS_NEEDED + - :RECURRENT + default_from_api: true diff --git a/mmv1/templates/terraform/examples/node_group_maintenance_interval.tf.erb b/mmv1/templates/terraform/examples/node_group_maintenance_interval.tf.erb new file mode 100644 index 000000000000..94f2cb55a7d6 --- /dev/null +++ b/mmv1/templates/terraform/examples/node_group_maintenance_interval.tf.erb @@ -0,0 +1,18 @@ +resource "google_compute_node_template" "soletenant-tmpl" { + provider = google-beta + name = "<%= ctx[:vars]['template_name'] %>" + region = "us-central1" + node_type = "c2-node-60-240" +} + +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" + + initial_size = 1 + node_template = google_compute_node_template.soletenant-tmpl.id + + maintenance_interval = "RECURRENT" +}