Skip to content

Commit

Permalink
Fix nil reference to ShieldedNodes (#1314)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored and Ty Larrabee committed Oct 30, 2019
1 parent 8d3bdd3 commit 8553081
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion google-beta/resource_container_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8553081

Please sign in to comment.