» cloudflare_zone_settings_override

Provides a resource which customizes Cloudflare zone settings. Note that after destroying this resource Zone Settings will be reset to their initial values.

» Example Usage

resource "cloudflare_zone_settings_override" "test" {
    name = "${var.cloudflare_zone}"
    settings {
        brotli = "on",
        challenge_ttl = 2700
        security_level = "high"
        opportunistic_encryption = "on"
        automatic_https_rewrites = "on"
        mirage = "on"
        waf = "on"
        minify {
            css = "on"
            js = "off"
            html = "off"
        }
        security_header {
            enabled = true
        }
    }
}

» Argument Reference

The following arguments are supported:

  • name - (Required) The DNS zone to which apply settings.
  • settings - (Optional) Settings overrides that will be applied to the zone. If a setting is not specified the existing setting will be used. For a full list of available settings see below.

The settings block supports settings that may be applied to the zone. These may be on/off values, unitary fields, string values, integers or nested objects.

» On/Off Values

These can be specified as "on" or "off" string. Similar to boolean values, but here the empty string also means to use the existing value. Attributes available:

» String Values

  • cache_level. Allowed values: "aggressive", "basic", "simplified".
  • cname_flattening. Allowed values: "flatten_at_root", "flatten_all", "flatten_none".
  • min_tls_version. Allowed values: "1.0", "1.1", "1.2", "1.3".
  • polish. Allowed values: "off", "lossless", "lossy".
  • pseudo_ipv4. Allowed values: "off", "add_header", "overwrite_header".
  • security_level. Allowed values: "off" (Enterprise only), "essentially_off", "low", "medium", "high", "under_attack".
  • ssl. Allowed values: "off", "flexible", "full", "strict".
  • tls_1_3. Allowed values: "off", "on", "zrt".

» Integer Values

» Nested Objects

The minify attribute supports the following fields:

  • css (Required) "on"/"off"
  • html (Required) "on"/"off"
  • js (Required)"on"/"off"

The mobile_redirect attribute supports the following fields:

The security_header attribute supports the following fields:

» Attributes Reference

The following attributes are exported:

  • id - The zone ID.
  • initial_settings - Settings present in the zone at the time the resource is created. This will be used to restore the original settings when this resource is destroyed. Shares the same schema as the settings attribute (Above).
  • intial_settings_read_at - Time when this resource was created and the initial_settings were set.
  • readonly_settings - Which of the current settings are not able to be set by the user. Which settings these are is determined by plan level and user permissions.
  • zone_status. A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup.
  • zone_type. Status of the zone. Valid values: active, pending, initializing, moved, deleted, deactivated.