Skip to content

Commit

Permalink
Fix #2129: Cluster addon fails on apply after timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
kavya498 authored and hkantare committed Dec 22, 2020
1 parent caa64b8 commit 8171f02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ibm/resource_ibm_container_addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func resourceIBMContainerAddOnsCreate(d *schema.ResourceData, meta interface{})
}
payload.Enable = true
_, err = addOnAPI.ConfigureAddons(cluster, &payload, targetEnv)
if err != nil {
if err != nil && !strings.Contains(err.Error(), "Request failed with status code: 409") {
return err
}
_, err = waitForContainerAddOns(d, meta, cluster, schema.TimeoutCreate)
Expand Down Expand Up @@ -257,7 +257,7 @@ func resourceIBMContainerAddOnsUpdate(d *schema.ResourceData, meta interface{})
updateList.AddonsList = append(updateList.AddonsList, update)
updateList.Update = true
_, err = addOnAPI.ConfigureAddons(cluster, &updateList, targetEnv)
if err != nil {
if err != nil && !strings.Contains(err.Error(), "Request failed with status code: 409") {
return err
}
_, err = waitForContainerAddOns(d, meta, cluster, schema.TimeoutUpdate)
Expand Down Expand Up @@ -288,7 +288,7 @@ func resourceIBMContainerAddOnsUpdate(d *schema.ResourceData, meta interface{})
}
addOnParams.Enable = true
_, err = addOnAPI.ConfigureAddons(cluster, &addOnParams, targetEnv)
if err != nil {
if err != nil && !strings.Contains(err.Error(), "Request failed with status code: 409") {
return err
}
_, err = waitForContainerAddOns(d, meta, cluster, schema.TimeoutCreate)
Expand Down

0 comments on commit 8171f02

Please sign in to comment.