Skip to content

Commit

Permalink
updated field name (#6550) (#12566)
Browse files Browse the repository at this point in the history
Co-authored-by: Edward Sun <sunedward@google.com>
Signed-off-by: Modular Magician <magic-modules@google.com>

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 15, 2022
1 parent 52e7af5 commit 06b8305
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changelog/6550.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: fixed unable to update `most_disruptive_allowed_action` for both `google_compute_per_instance_config` and `google_compute_region_per_instance_config`
```
4 changes: 2 additions & 2 deletions google/resource_compute_per_instance_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ func resourceComputePerInstanceConfigUpdate(d *schema.ResourceData, meta interfa
}
obj["minimalAction"] = minAction

mostDisruptiveAction := d.Get("most_disruptive_action_allowed")
if mostDisruptiveAction != "" {
mostDisruptiveAction := d.Get("most_disruptive_allowed_action")
if isEmptyValue(reflect.ValueOf(mostDisruptiveAction)) {
mostDisruptiveAction = "REPLACE"
}
obj["mostDisruptiveActionAllowed"] = mostDisruptiveAction
Expand Down
4 changes: 2 additions & 2 deletions google/resource_compute_region_per_instance_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ func resourceComputeRegionPerInstanceConfigUpdate(d *schema.ResourceData, meta i
}
obj["minimalAction"] = minAction

mostDisruptiveAction := d.Get("most_disruptive_action_allowed")
if mostDisruptiveAction != "" {
mostDisruptiveAction := d.Get("most_disruptive_allowed_action")
if isEmptyValue(reflect.ValueOf(mostDisruptiveAction)) {
mostDisruptiveAction = "REPLACE"
}
obj["mostDisruptiveActionAllowed"] = mostDisruptiveAction
Expand Down

0 comments on commit 06b8305

Please sign in to comment.