cloudflare_ruleset
headers
are wrongly sorted and result in an terraform exception
#3487
Closed
3 tasks done
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
triage/debug-log-attached
Indicates an issue or PR has a complete Terraform debug log.
Confirmation
Terraform and Cloudflare provider version
Terraform v1.9.2
on darwin_amd64
Affected resource(s)
cloudflare_ruleset
Terraform configuration files
Link to debug output
https://gist.github.com/Cookiiiies/b3c6c066046c6fa58611685e2e62edf7
Panic output
No response
Expected output
It seems like the sorting is not working as expected. If I put the header entries in alphabetically sorted order, the provider is working as expected. If I change the order the provider is failing.
So a "workaround" is to simple add
headers
the entries in a alphabetically order. Only tested for the phasehttp_response_headers_transform
Actual output
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to cloudflare_ruleset.response_header_remove_test, provider "provider["registry.terraform.io/cloudflare/cloudflare"]" produced an unexpected new value:
│ .rules[0].action_parameters[0].headers[1].name: was cty.StringVal("xb_1"), but now cty.StringVal("xa_2").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to cloudflare_ruleset.response_header_remove_test, provider "provider["registry.terraform.io/cloudflare/cloudflare"]" produced an unexpected new value:
│ .rules[0].action_parameters[0].headers[2].name: was cty.StringVal("xa_2"), but now cty.StringVal("xb_1").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
Steps to reproduce
headers
"xb_1" with "xa_1"Additional factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: