From 188ef62f1f9368c214a3fd7f3348f50c7f28f556 Mon Sep 17 00:00:00 2001 From: Alex Feel Date: Tue, 2 Aug 2022 14:29:14 +0300 Subject: [PATCH] Remove support for deprecated `always_online` action More info at https://github.com/cloudflare/terraform-provider-cloudflare/issues/1787#issuecomment-1190113657. --- USAGE.md | 2 +- examples/basic/main.tf | 1 - examples/page-rules-with-priorities/main.tf | 1 - main.tf | 1 - variables.tf | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/USAGE.md b/USAGE.md index 49d6d7e..bf0991a 100644 --- a/USAGE.md +++ b/USAGE.md @@ -80,7 +80,7 @@ No modules. | [security\_header](#input\_security\_header) | Cloudflare security headers for a zone.
Available on the following plans: "free", "partners\_free", "pro", "partners\_pro", "business", "partners\_business", "enterprise", "partners\_enterprise".
Possible values for the `enabled` argument: true, false.
Possible values for the `preload` argument: true, false.
Possible values for the `max_age` argument: between 0 and 2147483647.
Possible values for the `include_subdomains` argument: true, false.
Possible values for the `nosniff` argument: true, false. |
object({
enabled = optional(bool)
preload = optional(bool)
max_age = optional(number)
include_subdomains = optional(bool)
nosniff = optional(bool)
})
|
{
"enabled": true,
"include_subdomains": true,
"max_age": 86400,
"nosniff": true,
"preload": false
}
| no | | [enable\_dnssec](#input\_enable\_dnssec) | Enable or disable DNSSEC.
Available on the following plans: "free", "partners\_free", "pro", "partners\_pro", "business", "partners\_business", "enterprise", "partners\_enterprise".
Possible values: true, false. | `bool` | `false` | no | | [records](#input\_records) | Zone's DNS records.
Available on the following plans: "free", "partners\_free", "pro", "partners\_pro", "business", "partners\_business", "enterprise", "partners\_enterprise".
Possible values for the `type` argument: "A", "AAAA", "CAA", "CERT", "CNAME", "DNSKEY", "DS", "HTTPS", "LOC", "MX", "NAPTR", "NS", "PTR", "SMIMEA", "SPF", "SRV", "SSHFP", "SVCB", "TLSA", "TXT", "URI".
Possible values for the `priority` argument: between 0 and 65535.
Possible values for the `ttl` argument: between 60 and 86400, or 1 for automatic. |
list(object({
record_name = string
type = string
name = optional(string)
value = optional(string)
data = optional(object({
algorithm = optional(number)
altitude = optional(number)
certificate = optional(string)
content = optional(string)
digest = optional(string)
digest_type = optional(number)
fingerprint = optional(string)
flags = optional(string)
key_tag = optional(number)
lat_degrees = optional(number)
lat_direction = optional(string)
lat_minutes = optional(number)
lat_seconds = optional(number)
long_degrees = optional(number)
long_direction = optional(string)
long_minutes = optional(number)
long_seconds = optional(number)
matching_type = optional(number)
name = optional(string)
order = optional(number)
port = optional(number)
precision_horz = optional(number)
precision_vert = optional(number)
preference = optional(number)
priority = optional(number)
proto = optional(string)
protocol = optional(number)
public_key = optional(string)
regex = optional(string)
replacement = optional(string)
selector = optional(number)
service = optional(string)
size = optional(number)
tag = optional(string)
target = optional(string)
type = optional(number)
usage = optional(number)
value = optional(string)
weight = optional(number)
}))
priority = optional(number)
ttl = optional(number)
proxied = optional(bool)
}))
| `[]` | no | -| [page\_rules](#input\_page\_rules) | Zone's page rules.
Number of allowed page rules depending on the plan:
"free": 3;
"pro", "partners\_pro": 20;
"business", "partners\_business": 50;
"enterprise", "partners\_enterprise": 125.
Availability of values depending on the plan is the same as the availability of the same settings for the cloudflare\_zone\_settings\_override resource, and for other settings, the availability can be found at https://support.cloudflare.com/hc/en-us/articles/218411427#h_18YTlvNlZET4Poljeih3TJ. |
list(object({
page_rule_name = string
target = string
actions = object({
always_online = optional(string)
always_use_https = optional(bool)
automatic_https_rewrites = optional(string)
browser_cache_ttl = optional(number)
browser_check = optional(string)
bypass_cache_on_cookie = optional(string)
cache_by_device_type = optional(string)
cache_deception_armor = optional(string)
cache_key_fields = optional(object({
cookie = optional(object({
check_presence = optional(list(string))
include = optional(list(string))
}))
header = optional(object({
check_presence = optional(list(string))
exclude = optional(list(string))
include = optional(list(string))
}))
host = optional(object({
resolved = optional(bool)
}))
query_string = optional(object({
exclude = optional(list(string))
include = optional(list(string))
ignore = optional(bool)
}))
user = optional(object({
device_type = optional(bool)
geo = optional(bool)
lang = optional(bool)
}))
}))
cache_level = optional(string)
cache_on_cookie = optional(string)
cache_ttl_by_status = optional(list(object({
codes = string
ttl = number
})))
disable_apps = optional(bool)
disable_performance = optional(bool)
disable_railgun = optional(bool)
disable_security = optional(bool)
disable_zaraz = optional(bool)
edge_cache_ttl = optional(number)
email_obfuscation = optional(string)
explicit_cache_control = optional(string)
forwarding_url = optional(object({
url = string
status_code = number
}))
host_header_override = optional(string)
ip_geolocation = optional(string)
minify = optional(object({
html = optional(string)
css = optional(string)
js = optional(string)
}))
mirage = optional(string)
opportunistic_encryption = optional(string)
origin_error_page_pass_thru = optional(string)
polish = optional(string)
resolve_override = optional(string)
respect_strong_etag = optional(string)
response_buffering = optional(string)
rocket_loader = optional(string)
security_level = optional(string)
server_side_exclude = optional(string)
smart_errors = optional(string)
sort_query_string_for_cache = optional(string)
ssl = optional(string)
true_client_ip_header = optional(string)
waf = optional(string)
})
priority = optional(number)
status = optional(string)
}))
| `[]` | no | +| [page\_rules](#input\_page\_rules) | Zone's page rules.
Number of allowed page rules depending on the plan:
"free": 3;
"pro", "partners\_pro": 20;
"business", "partners\_business": 50;
"enterprise", "partners\_enterprise": 125.
Availability of values depending on the plan is the same as the availability of the same settings for the cloudflare\_zone\_settings\_override resource, and for other settings, the availability can be found at https://support.cloudflare.com/hc/en-us/articles/218411427#h_18YTlvNlZET4Poljeih3TJ. |
list(object({
page_rule_name = string
target = string
actions = object({
always_use_https = optional(bool)
automatic_https_rewrites = optional(string)
browser_cache_ttl = optional(number)
browser_check = optional(string)
bypass_cache_on_cookie = optional(string)
cache_by_device_type = optional(string)
cache_deception_armor = optional(string)
cache_key_fields = optional(object({
cookie = optional(object({
check_presence = optional(list(string))
include = optional(list(string))
}))
header = optional(object({
check_presence = optional(list(string))
exclude = optional(list(string))
include = optional(list(string))
}))
host = optional(object({
resolved = optional(bool)
}))
query_string = optional(object({
exclude = optional(list(string))
include = optional(list(string))
ignore = optional(bool)
}))
user = optional(object({
device_type = optional(bool)
geo = optional(bool)
lang = optional(bool)
}))
}))
cache_level = optional(string)
cache_on_cookie = optional(string)
cache_ttl_by_status = optional(list(object({
codes = string
ttl = number
})))
disable_apps = optional(bool)
disable_performance = optional(bool)
disable_railgun = optional(bool)
disable_security = optional(bool)
disable_zaraz = optional(bool)
edge_cache_ttl = optional(number)
email_obfuscation = optional(string)
explicit_cache_control = optional(string)
forwarding_url = optional(object({
url = string
status_code = number
}))
host_header_override = optional(string)
ip_geolocation = optional(string)
minify = optional(object({
html = optional(string)
css = optional(string)
js = optional(string)
}))
mirage = optional(string)
opportunistic_encryption = optional(string)
origin_error_page_pass_thru = optional(string)
polish = optional(string)
resolve_override = optional(string)
respect_strong_etag = optional(string)
response_buffering = optional(string)
rocket_loader = optional(string)
security_level = optional(string)
server_side_exclude = optional(string)
smart_errors = optional(string)
sort_query_string_for_cache = optional(string)
ssl = optional(string)
true_client_ip_header = optional(string)
waf = optional(string)
})
priority = optional(number)
status = optional(string)
}))
| `[]` | no | ## Outputs diff --git a/examples/basic/main.tf b/examples/basic/main.tf index 85e1657..434b5d0 100644 --- a/examples/basic/main.tf +++ b/examples/basic/main.tf @@ -69,7 +69,6 @@ module "acme_com" { page_rule_name = "change_login_page_settings" target = "acme.com/login" actions = { - always_online = "off" browser_check = "on" security_level = "high" } diff --git a/examples/page-rules-with-priorities/main.tf b/examples/page-rules-with-priorities/main.tf index eba503b..57f3177 100644 --- a/examples/page-rules-with-priorities/main.tf +++ b/examples/page-rules-with-priorities/main.tf @@ -56,7 +56,6 @@ resource "cloudflare_page_rule" "change_login_page_settings" { target = "acme.com/login" actions { - always_online = "off" browser_check = "on" security_level = "high" } diff --git a/main.tf b/main.tf index dca989a..31ecffe 100644 --- a/main.tf +++ b/main.tf @@ -362,7 +362,6 @@ resource "cloudflare_page_rule" "this" { target = each.value.target actions { - always_online = each.value.actions.always_online always_use_https = each.value.actions.always_use_https automatic_https_rewrites = each.value.actions.automatic_https_rewrites browser_cache_ttl = try(each.value.actions.browser_cache_ttl >= local.cloudflare_page_rule_values_avail.browser_cache_ttl, false) ? each.value.actions.browser_cache_ttl : each.value.actions.browser_cache_ttl != null ? local.browser_cache_ttl_closest_avail_values[var.plan] : null diff --git a/variables.tf b/variables.tf index 4a4f6f8..fbbea65 100644 --- a/variables.tf +++ b/variables.tf @@ -507,7 +507,6 @@ variable "page_rules" { page_rule_name = string target = string actions = object({ - always_online = optional(string) always_use_https = optional(bool) automatic_https_rewrites = optional(string) browser_cache_ttl = optional(number)