From c55df303a3c05b0f234e2562d8113ffc4e168521 Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Tue, 7 Mar 2023 20:52:36 +0000 Subject: [PATCH] Add maintenance_interval field to Instance Template and Instance scheduling. (#7365) * Move testing to handwritten * Move testing to handwritten * Fix lint * Fix typo * Add remove step and update documentation * Add remove step and update documentation * Fix comparing string to nil * Add field to handwritten defs * rebase on main & resolve conflicts * Fix doc formatting * Add maintenance interval to Instance resource * Add maintenance interval to Instance resource * Add maintenance interval to Instance resource * Change function names to valid * Fix type mismatch * Fix type mismatch * Fix function name Signed-off-by: Modular Magician --- .changelog/7365.txt | 3 +++ website/docs/r/compute_instance.html.markdown | 2 +- website/docs/r/compute_instance_template.html.markdown | 9 ++++----- 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 .changelog/7365.txt diff --git a/.changelog/7365.txt b/.changelog/7365.txt new file mode 100644 index 00000000000..449ecd08930 --- /dev/null +++ b/.changelog/7365.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +compute: added `maintenance_interval` field to `instance-template` and `instance` resource (beta) +``` diff --git a/website/docs/r/compute_instance.html.markdown b/website/docs/r/compute_instance.html.markdown index 5d1f94b9dec..32928b64069 100644 --- a/website/docs/r/compute_instance.html.markdown +++ b/website/docs/r/compute_instance.html.markdown @@ -385,7 +385,6 @@ specified, then this instance will have no external IPv6 Internet access. Struct * `instance_termination_action` - (Optional) Describe the type of termination action for VM. Can be `STOP` or `DELETE`. Read more on [here](https://cloud.google.com/compute/docs/instances/create-use-spot) * `max_run_duration` - (Optional) [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) The duration of the instance. Instance will run and be terminated after then, the termination action could be defined in `instance_termination_action`. Only support `DELETE` `instance_termination_action` at this point. Structure is [documented below](#nested_max_run_duration). - The `max_run_duration` block supports: * `nanos` - (Optional) Span of time that's a fraction of a second at nanosecond @@ -397,6 +396,7 @@ specified, then this instance will have no external IPv6 Internet access. Struct 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years. +* `maintenance_interval` - (Optional) [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) Specifies the frequency of planned maintenance events. The accepted values are: `PERIODIC`. The `guest_accelerator` block supports: * `type` (Required) - The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`. diff --git a/website/docs/r/compute_instance_template.html.markdown b/website/docs/r/compute_instance_template.html.markdown index 3ecf36b5299..7ab6ed9a5da 100644 --- a/website/docs/r/compute_instance_template.html.markdown +++ b/website/docs/r/compute_instance_template.html.markdown @@ -565,19 +565,18 @@ specified, then this instance will have no external IPv6 Internet access. Struct * `instance_termination_action` - (Optional) Describe the type of termination action for `SPOT` VM. Can be `STOP` or `DELETE`. Read more on [here](https://cloud.google.com/compute/docs/instances/create-use-spot) * `max_run_duration` - (Optional) [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) The duration of the instance. Instance will run and be terminated after then, the termination action could be defined in `instance_termination_action`. Only support `DELETE` `instance_termination_action` at this point. Structure is [documented below](#nested_max_run_duration). - The `max_run_duration` block supports: * `nanos` - (Optional) Span of time that's a fraction of a second at nanosecond - resolution. Durations less than one second are represented with a 0 - `seconds` field and a positive `nanos` field. Must be from 0 to - 999,999,999 inclusive. + resolution. Durations less than one second are represented with a 0 + `seconds` field and a positive `nanos` field. Must be from 0 to + 999,999,999 inclusive. * `seconds` - (Required) Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years. - +* `maintenance_interval` - (Optional) [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) Specifies the frequency of planned maintenance events. The accepted values are: `PERIODIC`. The `guest_accelerator` block supports: * `type` (Required) - The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`.