Skip to content

Commit 58153d4

Browse files
Add host_error_timeout_seconds field to compute_instance on beta provider (#11652) (#2846)
[upstream:973809a6e894448e63c8bff820c8fa08c0e59fb5] Signed-off-by: Modular Magician <[email protected]>
1 parent e320e05 commit 58153d4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tfplan2cai/converters/google/resources/services/compute/compute_instance_helpers.go

+11
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ func expandScheduling(v interface{}) (*compute.Scheduling, error) {
159159
scheduling.OnInstanceStopAction = transformedOnInstanceStopAction
160160
scheduling.ForceSendFields = append(scheduling.ForceSendFields, "OnInstanceStopAction")
161161
}
162+
if v, ok := original["host_error_timeout_seconds"]; ok {
163+
scheduling.HostErrorTimeoutSeconds = int64(v.(int))
164+
}
165+
162166
if v, ok := original["maintenance_interval"]; ok {
163167
scheduling.MaintenanceInterval = v.(string)
164168
}
@@ -279,6 +283,10 @@ func flattenScheduling(resp *compute.Scheduling) []map[string]interface{} {
279283
schedulingMap["on_instance_stop_action"] = flattenOnInstanceStopAction(resp.OnInstanceStopAction)
280284
}
281285

286+
if resp.HostErrorTimeoutSeconds != 0 {
287+
schedulingMap["host_error_timeout_seconds"] = resp.HostErrorTimeoutSeconds
288+
}
289+
282290
if resp.MaintenanceInterval != "" {
283291
schedulingMap["maintenance_interval"] = resp.MaintenanceInterval
284292
}
@@ -706,6 +714,9 @@ func schedulingHasChangeWithoutReboot(d *schema.ResourceData) bool {
706714
if oScheduling["instance_termination_action"] != newScheduling["instance_termination_action"] {
707715
return true
708716
}
717+
if oScheduling["host_error_timeout_seconds"] != newScheduling["host_error_timeout_seconds"] {
718+
return true
719+
}
709720

710721
return false
711722
}

0 commit comments

Comments
 (0)