Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throttling rate limit rules are missing mitigation_timeout field #724

Open
2 tasks done
jan-verb opened this issue Jun 21, 2024 · 1 comment
Open
2 tasks done

Throttling rate limit rules are missing mitigation_timeout field #724

jan-verb opened this issue Jun 21, 2024 · 1 comment

Comments

@jan-verb
Copy link

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the library and it is still present.

cf-terraforming version

cf-terraforming 0.20.0

Expected outcome

Running cf-terraforming generate --resource-type "cloudflare_ruleset" --zone <zone-id> in a zone with a WAF rate limiting rule that throttles a request generates Terraform with the mitigation_timeout = 0.

Actual outcome

Running cf-terraforming generate --resource-type "cloudflare_ruleset" --zone <zone-id> in a zone with a WAF rate limiting rule that throttles a request generates Terraform without the mitigation_timeout field.

Steps to reproduce

  1. Create a WAF rate limiting rule in the UI that throttles a request
  2. Run cf-terraforming generate --resource-type "cloudflare_ruleset" --zone <zone-id>

References

Seems related to this issue: cloudflare/terraform-provider-cloudflare#2874

@jan-verb
Copy link
Author

The impact of this bug is that throttling rate limiting rules configured successfully in the Cloudflare dashboard fail to terraform apply if generated with cf-terraforming.

Because the rate limiting rule's generated Terraform is missing the mitigation_timeout field, the following error is raised during terraform apply:

Error: Provider produced inconsistent result after apply
When applying changes to module.rate_limit_rules.cloudflare_ruleset.rate_limit_rules, provider "provider[\"registry.terraform.io/cloudflare/cloudflare\"]" produced an unexpected new value: .rules[1].ratelimit[0].mitigation_timeout: was null, but now cty.NumberIntVal(0).

This is a bug in the provider, which should be reported in the provider's own issue tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant