You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recently been looking at migrating all of my organization's Cloudflare configuration into a Terraform project to allow us to quickly and easily provision new zones.
We have some rate limits in place which require the challenge and js_challenge actions to be applied to traffic. At present only simulate and ban actions are allowed in the cloudflare_rate_limit.action.mode field the current version of the cloudflare-provider.
Cloudflare's API documentation hints that if the mode is either challenge or js_challenge then cloudflare_rate_limit.action.timeout and cloudflare_rate_limit.action.response should not be provided.
I've made modifications to the cloudflare-provider locally to allow these these new modes and to make timeout optional and have successfully managed to Terraform the rate limit as expected. I would raise a PR, though want to ensure that these two modes weren't explicitly excluded before doing so.
Howdy @jdarley! You're spot on regarding the missing mode values, they should be present. IIRC, the reasoning is that the resource was added before those two were acceptable values and it just hasn't been needed since.
I've recently been looking at migrating all of my organization's Cloudflare configuration into a Terraform project to allow us to quickly and easily provision new zones.
We have some rate limits in place which require the
challenge
andjs_challenge
actions to be applied to traffic. At present onlysimulate
andban
actions are allowed in thecloudflare_rate_limit.action.mode
field the current version of the cloudflare-provider.Cloudflare's API documentation hints that if the mode is either
challenge
orjs_challenge
thencloudflare_rate_limit.action.timeout
andcloudflare_rate_limit.action.response
should not be provided.I've made modifications to the cloudflare-provider locally to allow these these new modes and to make timeout optional and have successfully managed to Terraform the rate limit as expected. I would raise a PR, though want to ensure that these two modes weren't explicitly excluded before doing so.
Terraform Version
Terraform v0.11.10
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Creation of a Cloudflare rate-limit which applies a JS Challenge to matching traffic.
Actual Behavior
The text was updated successfully, but these errors were encountered: