[X] This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
[X] I have searched the issue tracker and my issue isn't already found.
[X] I have replicated my issue using the latest version of the provider and it is still present.
Terraform and Cloudflare provider version
Terraform v1.9.2
on darwin_arm64
+ provider registry.terraform.io/cloudflare/cloudflare v4.38.0
2024-07-25T14:50:11.964-0400 [ERROR] vertex "cloudflare_list_item.item_1" error: failed to create list item: <unknown>
Error: failed to create list item: <unknown>
with cloudflare_list_item.item_1,
on test_list.tf line 8, in resource "cloudflare_list_item" "item_1":
8: resource "cloudflare_list_item" "item_1" {
failed to match exactly one list item
Steps to reproduce
Create a cloudflare_list with kind = "hostname"
Create a cloudflare_list_item with hostname.url_hostname = "some.string"
Create a cloudflare_list_item with hostname.url_hostname = "longer-some.string"
Run terraform apply and observe that Terraform is unable to successfully complete the apply
Note that all cloudflare_list_items are actually present within the CloudFlare console
Additional factoids
A screenshot of the created list within the CloudFlare console after applying the failing terraform above
Please vote on this issue by adding a 👍 reaction to the original post 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 issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Confirmation
Terraform and Cloudflare provider version
Affected resource(s)
cloudflare_list_item
Terraform configuration files
Link to debug output
https://gist.github.com/patrick-vares-stash/5910e2100e4ded69566145bffbe522db
Panic output
No response
Expected output
Successful create of 3 resources:
cloudflare_list.test_bug
cloudflare_list_item.item_1
cloudflare_list_item.item_2
Actual output
Successful create of 2 resources:
cloudflare_list.test_bug
cloudflare_list_item.item_2
Failed create of 1 resource:
cloudflare_list_item.item_1
Steps to reproduce
cloudflare_list
withkind = "hostname"
cloudflare_list_item
withhostname.url_hostname = "some.string"
cloudflare_list_item
withhostname.url_hostname = "longer-some.string"
terraform apply
and observe that Terraform is unable to successfully complete theapply
cloudflare_list_item
s are actually present within the CloudFlare consoleAdditional factoids
A screenshot of the created list within the CloudFlare console after applying the failing terraform above
References
No response