terraform-provider-cloudflare
terraform-provider-cloudflare copied to clipboard
terraform cloudflare_turnstile_widget Error reading challenge widget when offlabel=true
Confirmation
- [X] My issue isn't already found on the issue tracker.
- [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.7.1
Provider cloudflare/cloudflare v4.16.0 and v4.23.0
Affected resource(s)
cloudflare_turnstile_widget
Terraform configuration files
resource "cloudflare_turnstile_widget" "main" {
account_id = "05frrr5f66s5ss5568fe"
name = "Example Widget"
domains = "[mydomain.com]"
mode = "non-interactive"
offlabel = "true"
}
Link to debug output
https://gist.github.com/MagonBC/6b05a7006e792f9a59e0db31bde5da6f
Panic output
No response
Expected output
Terraform will perform the following actions:
cloudflare_turnstile_widget.main will be updated in-place
~ resource "cloudflare_turnstile_widget" "main" { ~ bot_fight_mode = false -> (known after apply) id = "0xthesite_key" name = "Example Widget" ~ offlabel = false -> true ~ region = "world" -> (known after apply) ~ secret = (sensitive value) # (3 unchanged attributes hidden) }
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve.
Enter a value: yes
cloudflare_turnstile_widget.main: Modifying... [id=thesite_key] cloudflare_turnstile_widget.main: Modifications complete after 1s [id=thesite_key]
Actual output
╷ │ Error: Error reading challenge widget │ │ with cloudflare_turnstile_widget.main, │ on main.tf line 1, in resource "cloudflare_turnstile_widget" "main": │ 1: resource "cloudflare_turnstile_widget" "main" { │ │ required site key missing ╵
Steps to reproduce
With Turnstile Widget license free: (https://www.cloudflare.com/products/turnstile/)
- set offlabel=true
- terraform apply
- reset offlabel=false
- terraform apply
With Enterprise License:
- terraform apply
- set offlabel=true
- terraform apply
Additional factoids
No response
References
No response
Community Note
Voting for Prioritization
- 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.
Terraform debug log detected :white_check_mark:
Can you set true instead of "true" in the terraform config?
Can you set true instead of "true" in the terraform config?
It's not related to the "true"
. I've the same issue, but use booleans without quotes.
Hello, have you find any workaround? I am getting the same error no matter what arguments I combine. I am using enterprise version.
EDIT: deleting state and start over is way to go.
This functionality has been released in v4.32.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!