cloudflare/ruleset

A thin wrapper around a single `cloudflare_ruleset`. It adds no behaviour: the `rules` list goes to the provider exactly as given, and `description` left `null` stays unset. It exists so that a leaf managing a ruleset calls a pigeon-lib module (LIB-0004). It's **zone-scoped**: a leaf calling it lives at `terraform/cloudflare/<zone>/ruleset/<instance>/`, where `<zone>` is the zone's apex domain. `terragrunt/root-hcl` v2.2.0 then gives the leaf `local.cloudflare_zone_id` for that zone (LIB-0008).

Usage

module "ruleset" {
  source = "https://pigeon.dev/modules/cloudflare/ruleset/v0.1.0"

  zone_id = local.cloudflare_zone_id
  name    = "example.com to example.org redirect"
  kind    = "zone"
  phase   = "http_request_dynamic_redirect"

  rules = [{
    expression  = "(http.host eq "example.com")"
    description = "redirect example.com to example.org"
    action      = "redirect"
    action_parameters = {
      from_value = {
        status_code           = 301
        target_url            = { value = "https://example.org" }
        preserve_query_string = false
      }
    }
  }]
}

Full inputs/outputs documentation is in the module's README on GitHub.

Versions