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 name of the DNS zone to apply rate limiting to.
  • 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".
  • polish. Allowed values: "off", "lossless", "lossy".
  • rocket_loader. Allowed values: "on", "off", "manual".
  • security_level. Allowed values: "essentially_off", "low", "medium", "high", "under_attack".
  • ssl. Allowed values: "off", "flexible", "full", "strict".
  • pseudo_ipv4. Allowed values: "off", "add_header", "overwrite_header".
  • cname_flattening.

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.

© 2018 HashiCorp
Licensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/cloudflare/r/zone_settings_override.html