From 855308180f58d7f0d77c6dec2abed608eded7ac5 Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 30 Oct 2019 10:54:35 -0700 Subject: [PATCH] Fix nil reference to ShieldedNodes (#1314) Signed-off-by: Modular Magician --- google-beta/resource_container_cluster.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/google-beta/resource_container_cluster.go b/google-beta/resource_container_cluster.go index a1125594f5..d00fad60fb 100644 --- a/google-beta/resource_container_cluster.go +++ b/google-beta/resource_container_cluster.go @@ -1243,7 +1243,9 @@ func resourceContainerClusterRead(d *schema.ResourceData, meta interface{}) erro d.Set("monitoring_service", cluster.MonitoringService) d.Set("network", cluster.NetworkConfig.Network) d.Set("subnetwork", cluster.NetworkConfig.Subnetwork) - d.Set("enable_shielded_nodes", cluster.ShieldedNodes.Enabled) + if cluster.ShieldedNodes != nil { + d.Set("enable_shielded_nodes", cluster.ShieldedNodes.Enabled) + } d.Set("enable_binary_authorization", cluster.BinaryAuthorization != nil && cluster.BinaryAuthorization.Enabled) d.Set("enable_tpu", cluster.EnableTpu) d.Set("tpu_ipv4_cidr_block", cluster.TpuIpv4CidrBlock)