Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call WorkerPoolUpdate at the end of create #4377

Merged
merged 2 commits into from
Mar 2, 2023

Conversation

z0za
Copy link
Contributor

@z0za z0za commented Feb 28, 2023

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Output from acceptance testing:

% make testacc TEST=./ibm/service/kubernetes TESTARGS='-run=TestAccIBMContainerWorkerPoolBasic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./ibm/service/kubernetes -v -run=TestAccIBMContainerWorkerPoolBasic -timeout 700m
...
=== RUN   TestAccIBMContainerWorkerPoolBasic
--- PASS: TestAccIBMContainerWorkerPoolBasic (1462.79s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/kubernetes      1464.365s
...

@z0za z0za marked this pull request as ready for review March 1, 2023 13:21
@@ -275,7 +275,7 @@ func resourceIBMContainerWorkerPoolCreate(d *schema.ResourceData, meta interface

d.SetId(fmt.Sprintf("%s/%s", clusterNameorID, res.ID))

return resourceIBMContainerWorkerPoolRead(d, meta)
return resourceIBMContainerWorkerPoolUpdate(d, meta)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In update method resourceIBMContainerWorkerPoolUpdate we do have other two d.HasChange("size_per_zone") and d.HasChange("labels") will also diff even if we used them during of create worker pool . Can you add this condition also

if d.HasChange("size_per_zone") && !d.IsNewResource()

for both else it will unneceessaty update calls.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, thx. added the check in a241014

@z0za z0za requested a review from hkantare March 2, 2023 06:14
@hkantare hkantare merged commit bc80162 into IBM-Cloud:master Mar 2, 2023
@z0za z0za deleted the classic_workerpool_taint branch March 3, 2023 10:48
IBM-diksha pushed a commit to IBM-diksha/terraform-provider-ibm that referenced this pull request Mar 17, 2023
* call WorkerPoolUpdate at the end of create

* check for new resource in WorkerPoolUpdate

---------

Co-authored-by: Zoltan Illes <zoltan.illes@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants