Account WAF Terraform Example

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

.com

What is the issue or error you’re encountering

Account WAF custom ruleset Terraform configuration

What steps have you taken to resolve the issue?

What is the correct way to manage Account WAF custom rules using Terraform?
I can import entrypoint Account WAF ruleset but I don’t understand how manage rulesets inside entrypoint ruleset.

My current configuration looks like:

resource "cloudflare_ruleset" "root" {
  name       = "root"
  account_id = var.accountId
  phase      = "http_request_firewall_custom"
  kind       = "root"

  rules {
     Some code here to manage ruleset, not rule.
  }
}

I don’t understand how to use rulesets inside cloudflare_ruleset, because Account WAF entrypoint custom rules contains other rulesets instead of rules.

What is the correct way to manage Account WAF custom rules using Terraform?

Hello serhii.didanov,

Please in order for you to have a complete understanding on how Terraform works related to WAF Custom Rule config, detain our documentation here:

Hopefully it helps!

Cheers

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.