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

Don't set items for lists when not needed #4511

Merged

Conversation

Cyb3r-Jak3
Copy link
Contributor

@Cyb3r-Jak3 Cyb3r-Jak3 commented Nov 5, 2024

Fixes #4469

Before, the cloudflare_list resource would always read the items from a list, even if they were not configured. With this change, items from the list are not read if there are none in the model. Similar to the SDKV2 resource.

The best way to test this is the list_item tests, as they will fail without this change.

Copy link
Contributor

github-actions bot commented Nov 5, 2024

changelog detected ✅

@jacobbednarz
Copy link
Member

tests are passing

TF_ACC=1 go test ./internal/framework/service/list/ -run "^TestAcc" -count 1 -v
=== RUN   TestAccCloudflareList_Exists
--- PASS: TestAccCloudflareList_Exists (2.56s)
=== RUN   TestAccCloudflareList_UpdateDescription
--- PASS: TestAccCloudflareList_UpdateDescription (6.02s)
=== RUN   TestAccCloudflareList_Update
--- PASS: TestAccCloudflareList_Update (30.98s)
=== RUN   TestAccCloudflareList_UpdateIgnoreIPOrdering
--- PASS: TestAccCloudflareList_UpdateIgnoreIPOrdering (5.26s)
=== RUN   TestAccCloudflareList_RemoveInlineConfig
--- PASS: TestAccCloudflareList_RemoveInlineConfig (10.54s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/list	56.562s

@jacobbednarz jacobbednarz merged commit c03faeb into cloudflare:master Nov 13, 2024
8 checks passed
@github-actions github-actions bot added this to the v4.46.0 milestone Nov 13, 2024
Copy link
Contributor

This functionality has been released in v4.46.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cloudflare_list items linking
2 participants