Terraform Page Rule

I’m working on migrating my Page Rules to Terraform. I’ve got all of them converted without issue, except for one rule. It looks like it’s changing or I don’t have it setup correctly in my Terraform block. I was wondering if someone could please provide some advice to make this work properly? Thank you!

Dashboard Rule that is getting migrated:

Terraform block:

resource "cloudflare_page_rule" "name-id" {
  zone_id  = var.domain_zone_id
  priority = 38
  status   = "active"
  target   = "domain.com/lead-submissions*/programs*"
  actions {
    cache_level = "aggressive"
    cache_key_fields {
      header {
        include = ["$${header:origin}::$${scheme}://$${host_header}$${uri}::$${header:accept}"]
      }
      query_string {}
      user {}
      cookie {}
      host {}
    }
  }
}

Changes that are wanting to be applied by Terraform:

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # cloudflare_page_rule.name-id will be updated in-place
  ~ resource "cloudflare_page_rule" "name-id" {
        id       = "rule-id"
        # (4 unchanged attributes hidden)

      + actions {
          + always_use_https    = false
          + cache_level         = "aggressive"
          + disable_apps        = false
          + disable_performance = false
          + disable_railgun     = false
          + disable_security    = false
          + cache_key_fields {
              + cookie {
                  + check_presence = (known after apply)
                  + include        = (known after apply)
                }

              + header {
                  + check_presence = (known after apply)
                  + exclude        = (known after apply)
                  + include        = [
                      + "${header:origin}::${scheme}://${host_header}${uri}::${header:accept}",
                    ]
                }

              + host {
                  + resolved = false
                }

              + query_string {
                  + exclude = (known after apply)
                  + include = (known after apply)
                }

              + user {}
            }
        }
    }

Plan: 0 to add, 1 to change, 0 to destroy.

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