mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-05 17:52:38 +00:00
Handle nil IAP in backend service decoder (#3459)
Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
parent
038c15561f
commit
c4d8953838
|
@ -1480,6 +1480,10 @@ func resourceComputeBackendServiceDecoder(d *schema.ResourceData, meta interface
|
||||||
// We need to pretend IAP isn't there if it's disabled for Terraform to maintain
|
// We need to pretend IAP isn't there if it's disabled for Terraform to maintain
|
||||||
// BC behaviour with the handwritten resource.
|
// BC behaviour with the handwritten resource.
|
||||||
v, ok := res["iap"]
|
v, ok := res["iap"]
|
||||||
|
if !ok || v == nil {
|
||||||
|
delete(res, "iap")
|
||||||
|
return res, nil
|
||||||
|
}
|
||||||
m := v.(map[string]interface{})
|
m := v.(map[string]interface{})
|
||||||
if ok && m["enabled"] == false {
|
if ok && m["enabled"] == false {
|
||||||
delete(res, "iap")
|
delete(res, "iap")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user