Skip to content

Commit

Permalink
Add maintenance_interval field to Instance Template and Instance sche…
Browse files Browse the repository at this point in the history
…duling. (hashicorp#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 <magic-modules@google.com>
  • Loading branch information
modular-magician committed Mar 7, 2023
1 parent a46f4f4 commit c55df30
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .changelog/7365.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
compute: added `maintenance_interval` field to `instance-template` and `instance` resource (beta)
```
2 changes: 1 addition & 1 deletion website/docs/r/compute_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<a name="nested_max_run_duration"></a>The `max_run_duration` block supports:

* `nanos` - (Optional) Span of time that's a fraction of a second at nanosecond
Expand All @@ -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`.
<a name="nested_guest_accelerator"></a>The `guest_accelerator` block supports:

* `type` (Required) - The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`.
Expand Down
9 changes: 4 additions & 5 deletions website/docs/r/compute_instance_template.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<a name="nested_max_run_duration"></a>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`.
<a name="nested_guest_accelerator"></a>The `guest_accelerator` block supports:

* `type` (Required) - The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`.
Expand Down

0 comments on commit c55df30

Please sign in to comment.