query_string include list makes wrong API call #4925
Labels
kind/bug
Categorizes issue or PR as related to a bug.
triage/needs-information
Indicates an issue needs more information in order to work on it.
Confirmation
Terraform and Cloudflare provider version
OpenTofu v1.8.7
on linux_amd64
Affected resource(s)
cloudflare_ruleset
Terraform configuration files
Link to debug output
https://gist.github.com/devin-purple/03977db5c95a8eb07522a4dd1dff81de
Panic output
No response
Expected output
The provider is sending this as the API call
"query_string":{"include":{"list":["one","two","three"]}}}}
This seems incorrect, as it ends up looking like this in the UI (blank). When I query the API it also returns the same structure.
When I configure the rule manually with the UI, querying the API comes back with this format - note the missing nested "list" parameter, and "include" is now an array and not an object.
Actual output
query_string configuration is blank in UI
Steps to reproduce
Additional factoids
According to the documentation here, the structure of the block looks correct, with a nested "include" and "list" property.
https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/ruleset#nestedatt--rules--action_parameters--cache_key--custom_key--query_string
https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/ruleset#nestedatt--rules--action_parameters--cache_key--custom_key--query_string--include
The API documentation is the same: https://developers.cloudflare.com/api/resources/rulesets/subresources/rules/models/set_cache_settings_rule/#(schema)%20%3E%20(property)%20action_parameters%20%3E%20(property)%20cache
References
No response
The text was updated successfully, but these errors were encountered: