Ruleset for account with kind custom should not use entrypoint #1242
Labels
kind/bug
Categorizes issue or PR as related to a bug.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
workflow/pr-attached
Indicates the issue has PR(s) attached.
Confirmation
Terraform and Cloudflare provider version
Affected resource(s)
The ressource
cloudflare_ruleset
is affected by that bug when you are using the account level and kind custom.The way the creation seem to be implemented is not working for the kind Custom. Currently right after the creation of the rulesets, the entrypoint is called, in the case of Custom rules that endpoint is not relevant and the following endpoint should be used instead:
PUT -> /client/v4/accounts/<account>/rulesets/<rulesets_id>
Terraform configuration files
Debug output
The logs from the terraform in DEBUG mode is as followed:
Panic output
No response
Expected output
None the custom firewall rules should be created and the
http_request_firewall_custom
entrypoint should refer to that ID.Actual output
The error output is the following:
Steps to reproduce
cloudflare_ruleset
with a kind set as cutomAdditional factoids
As per the debug file we can see that the ruleset is created with a POST first and then edited with the rules on the entrypoint. As per the documentation here the ruleset should be edited on the path
/client/v4/accounts/<account>/rulesets/<rulesets_id>
. The entrypoint should be edited with the ressourcecloudflare_ruleset.account_custom_firewall_root
where we execute the Custom Rules created previously.References
https://developers.cloudflare.com/ruleset-engine/custom-rulesets/create-custom-ruleset
The text was updated successfully, but these errors were encountered: