Skip to content

Commit 060a7f7

Browse files
modular-magicianemilymye
authored andcommitted
Handle nil IAP in backend service decoder (hashicorp#622)
Signed-off-by: Modular Magician <[email protected]>
1 parent 780576c commit 060a7f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

google-beta/resource_compute_backend_service.go

+4
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,10 @@ func resourceComputeBackendServiceDecoder(d *schema.ResourceData, meta interface
15151515
// We need to pretend IAP isn't there if it's disabled for Terraform to maintain
15161516
// BC behaviour with the handwritten resource.
15171517
v, ok := res["iap"]
1518+
if !ok || v == nil {
1519+
delete(res, "iap")
1520+
return res, nil
1521+
}
15181522
m := v.(map[string]interface{})
15191523
if ok && m["enabled"] == false {
15201524
delete(res, "iap")

0 commit comments

Comments
 (0)