Skip to content

Commit

Permalink
updated to ONLY_SCALE_OUT (#8984) (#15890)
Browse files Browse the repository at this point in the history
* updated to ONLY_SCALE_OUT

* change the data type to string

---------

Signed-off-by: Modular Magician <magic-modules@google.com>
Co-authored-by: Edward Sun <sunedward@google.com>
  • Loading branch information
modular-magician and Edward Sun authored Sep 18, 2023
1 parent f58420b commit 4235a31
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .changelog/8984.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:bug
compute: updated the `autoscaling_policy.mode` to accept `ONLY_SCALE_OUT` on `google_compute_autoscaler`

```
9 changes: 4 additions & 5 deletions google/services/compute/resource_compute_autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,10 @@ Stackdriver Monitoring metric. Possible values: ["GAUGE", "DELTA_PER_SECOND", "D
},
},
"mode": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: verify.ValidateEnum([]string{"OFF", "ONLY_UP", "ON", ""}),
Description: `Defines operating mode for this policy. Default value: "ON" Possible values: ["OFF", "ONLY_UP", "ON"]`,
Default: "ON",
Type: schema.TypeString,
Optional: true,
Description: `Defines operating mode for this policy.`,
Default: "ON",
},
"scale_in_control": {
Type: schema.TypeList,
Expand Down
9 changes: 4 additions & 5 deletions google/services/compute/resource_compute_region_autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,10 @@ Stackdriver Monitoring metric. Possible values: ["GAUGE", "DELTA_PER_SECOND", "D
},
},
"mode": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: verify.ValidateEnum([]string{"OFF", "ONLY_UP", "ON", ""}),
Description: `Defines operating mode for this policy. Default value: "ON" Possible values: ["OFF", "ONLY_UP", "ON"]`,
Default: "ON",
Type: schema.TypeString,
Optional: true,
Description: `Defines operating mode for this policy.`,
Default: "ON",
},
"scale_in_control": {
Type: schema.TypeList,
Expand Down
2 changes: 0 additions & 2 deletions website/docs/r/compute_autoscaler.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ The following arguments are supported:
* `mode` -
(Optional)
Defines operating mode for this policy.
Default value is `ON`.
Possible values are: `OFF`, `ONLY_UP`, `ON`.

* `scale_down_control` -
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
Expand Down
2 changes: 0 additions & 2 deletions website/docs/r/compute_region_autoscaler.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ The following arguments are supported:
* `mode` -
(Optional)
Defines operating mode for this policy.
Default value is `ON`.
Possible values are: `OFF`, `ONLY_UP`, `ON`.

* `scale_down_control` -
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
Expand Down

0 comments on commit 4235a31

Please sign in to comment.