Soft Delete Bug in Zone Rulesets API

For Workes & Pages, what is the name of the domain?

What is the error number?


What is the error message?

error: error creating ruleset redirect-www-domain-4eb098: ‘zone’ is not a valid value for kind because exceeded maximum number of zone rulesets for phase http_request_dynamic_redirect

What is the issue or error you’re encountering

I created a bunch of redirect rulesets using Terraform. These were then deleted and I have no existing rulesets in my account, all counts show as 0 in the Cloudflare dashboard. However, when I use the API to create new Rulesets I get the above error. Terraform refresh on previous resources when they were deleted from the Dashboard also showed “updated” vs “deleted”. It seems like the Zone Rulesets are soft deleted and then counted in limits over the Cloudflare API? I am now unable to create new rulesets using API but doing so over Dashboard works fine.

What are the steps to reproduce the issue?

Create Zone Redirect Rulesets using Terraform. Delete using Dashboard. Run Refresh. Try creating additional ones and you will get the error.

Hi there,

Only one zone ruleset is allowed per phase, and it appears that there is already a default ruleset with the http_request_dynamic_redirect, which will need to be deleted before your rule can be deployed.

1 Like