Skip to content

Commit

Permalink
add nil check to nodepool management flattener (GoogleCloudPlatform#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
c2thorn authored and BBBmau committed Nov 5, 2024
1 parent b3decc3 commit d0fae85
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1198,11 +1198,13 @@ func flattenNodePool(d *schema.ResourceData, config *transport_tpg.Config, np *c
nodePool["max_pods_per_node"] = np.MaxPodsConstraint.MaxPodsPerNode
}

nodePool["management"] = []map[string]interface{}{
{
"auto_repair": np.Management.AutoRepair,
"auto_upgrade": np.Management.AutoUpgrade,
},
if np.Management != nil {
nodePool["management"] = []map[string]interface{}{
{
"auto_repair": np.Management.AutoRepair,
"auto_upgrade": np.Management.AutoUpgrade,
},
}
}

if np.UpgradeSettings != nil {
Expand Down

0 comments on commit d0fae85

Please sign in to comment.