Open lobeck opened 1 month ago
Voting for Prioritization
Volunteering to Work on This Issue
Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of TF_LOG=DEBUG
output to be provided. The only parts that should be redacted are your user credentials in the X-Auth-Key
, X-Auth-Email
and Authorization
HTTP headers. Details such as zone or account identifiers are not considered sensitive but can be redacted if you are very cautious. This log file provides additional context from Terraform, the provider and the Cloudflare API that helps in debugging issues. Without it, maintainers are very limited in what they can do and may hamper diagnosis efforts.
This issue has been marked with triage/needs-information
and is unlikely to receive maintainer attention until the log file is provided making this a complete bug report.
Alternatively someone needs to address this to CF.
After removing the flag and having it set through terraform, the api reports it as follow:
"serve_stale": {
"disable_stale_while_updating": false
}
This is now also parseable by the provider and doesn't panic anymore.
Can confirm this issue, adding disable_stale_while_updating section via UI without enabling it crashes terraform provider
Confirmation
Terraform and Cloudflare provider version
Terraform v1.7.5 on darwin_arm64
Affected resource(s)
cloudflare_ruleset
Terraform configuration files
Link to debug output
see below
Panic output
Expected output
resource import and diff
Actual output
crash
Steps to reproduce
create a cache rule in the ui and select "Add setting"
This will expand the rule like this:
In the API, this causes the following response:
Note the empty serve_stale map.
When looking at the panic, it crashes while it's trying to read
DisableStaleWhileUpdating
/disable_stale_while_updating
https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/internal/framework/service/rulesets/resource.go#L624
Additional factoids
No response
References
No response