Skip to content

Commit

Permalink
Handle null iap block in BackendService
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson committed Apr 18, 2019
1 parent b656b12 commit 20fe3f7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions templates/terraform/decoders/backend_service.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
// We need to pretend IAP isn't there if it's disabled for Terraform to maintain
// BC behaviour with the handwritten resource.
v, ok := res["iap"]
m := v.(map[string]interface{})
if ok && m["enabled"] == false {
delete(res, "iap")
if ok {
m := v.(map[string]interface{})

if m["enabled"] == false {
delete(res, "iap")
}
}

return res, nil

0 comments on commit 20fe3f7

Please sign in to comment.