Skip to content

Commit

Permalink
Update resource_container_cluster.go.erb
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayimeow authored Oct 25, 2023
1 parent 802e410 commit 247a14c
Showing 1 changed file with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3948,21 +3948,19 @@ func resourceContainerClusterUpdate(d *schema.ResourceData, meta interface{}) er
}

if d.HasChange("fleet") {
if fleet, ok := d.GetOk("fleet"); ok {
req := &container.UpdateClusterRequest{
Update: &container.ClusterUpdate{
DesiredFleet: expandFleet(fleet),
},
}
log.Printf("[INFO] GKE cluster %s fleet config has been updated, fleet=%v, req=%v", fleet, req)
req := &container.UpdateClusterRequest{
Update: &container.ClusterUpdate{
DesiredFleet: expandFleet(d.Get("fleet")),
},
}
log.Printf("[INFO] GKE cluster %s fleet config has been updated, fleet=%v, req=%v", fleet, req)

updateF := updateFunc(req, "updating GKE fleet config")
// Call update serially.
if err := transport_tpg.LockedCall(lockKey, updateF); err != nil {
return err
}
log.Printf("[INFO] GKE cluster %s fleet config has been updated", d.Id())
updateF := updateFunc(req, "updating GKE fleet config")
// Call update serially.
if err := transport_tpg.LockedCall(lockKey, updateF); err != nil {
return err
}
log.Printf("[INFO] GKE cluster %s fleet config has been updated", d.Id())
}

if d.HasChange("enable_k8s_beta_apis") {
Expand Down

0 comments on commit 247a14c

Please sign in to comment.