Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for deprecated always_online action #69

Merged
merged 1 commit into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ No modules.
| <a name="input_security_header"></a> [security\_header](#input\_security\_header) | Cloudflare security headers for a zone.<br>Available on the following plans: "free", "partners\_free", "pro", "partners\_pro", "business", "partners\_business", "enterprise", "partners\_enterprise".<br>Possible values for the `enabled` argument: true, false.<br>Possible values for the `preload` argument: true, false.<br>Possible values for the `max_age` argument: between 0 and 2147483647.<br>Possible values for the `include_subdomains` argument: true, false.<br>Possible values for the `nosniff` argument: true, false. | <pre>object({<br> enabled = optional(bool)<br> preload = optional(bool)<br> max_age = optional(number)<br> include_subdomains = optional(bool)<br> nosniff = optional(bool)<br> })</pre> | <pre>{<br> "enabled": true,<br> "include_subdomains": true,<br> "max_age": 86400,<br> "nosniff": true,<br> "preload": false<br>}</pre> | no |
| <a name="input_enable_dnssec"></a> [enable\_dnssec](#input\_enable\_dnssec) | Enable or disable DNSSEC.<br>Available on the following plans: "free", "partners\_free", "pro", "partners\_pro", "business", "partners\_business", "enterprise", "partners\_enterprise".<br>Possible values: true, false. | `bool` | `false` | no |
| <a name="input_records"></a> [records](#input\_records) | Zone's DNS records.<br>Available on the following plans: "free", "partners\_free", "pro", "partners\_pro", "business", "partners\_business", "enterprise", "partners\_enterprise".<br>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".<br>Possible values for the `priority` argument: between 0 and 65535.<br>Possible values for the `ttl` argument: between 60 and 86400, or 1 for automatic. | <pre>list(object({<br> record_name = string<br> type = string<br> name = optional(string)<br> value = optional(string)<br> data = optional(object({<br> algorithm = optional(number)<br> altitude = optional(number)<br> certificate = optional(string)<br> content = optional(string)<br> digest = optional(string)<br> digest_type = optional(number)<br> fingerprint = optional(string)<br> flags = optional(string)<br> key_tag = optional(number)<br> lat_degrees = optional(number)<br> lat_direction = optional(string)<br> lat_minutes = optional(number)<br> lat_seconds = optional(number)<br> long_degrees = optional(number)<br> long_direction = optional(string)<br> long_minutes = optional(number)<br> long_seconds = optional(number)<br> matching_type = optional(number)<br> name = optional(string)<br> order = optional(number)<br> port = optional(number)<br> precision_horz = optional(number)<br> precision_vert = optional(number)<br> preference = optional(number)<br> priority = optional(number)<br> proto = optional(string)<br> protocol = optional(number)<br> public_key = optional(string)<br> regex = optional(string)<br> replacement = optional(string)<br> selector = optional(number)<br> service = optional(string)<br> size = optional(number)<br> tag = optional(string)<br> target = optional(string)<br> type = optional(number)<br> usage = optional(number)<br> value = optional(string)<br> weight = optional(number)<br> }))<br> priority = optional(number)<br> ttl = optional(number)<br> proxied = optional(bool)<br> }))</pre> | `[]` | no |
| <a name="input_page_rules"></a> [page\_rules](#input\_page\_rules) | Zone's page rules.<br>Number of allowed page rules depending on the plan:<br>"free": 3;<br>"pro", "partners\_pro": 20;<br>"business", "partners\_business": 50;<br>"enterprise", "partners\_enterprise": 125.<br>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. | <pre>list(object({<br> page_rule_name = string<br> target = string<br> actions = object({<br> always_online = optional(string)<br> always_use_https = optional(bool)<br> automatic_https_rewrites = optional(string)<br> browser_cache_ttl = optional(number)<br> browser_check = optional(string)<br> bypass_cache_on_cookie = optional(string)<br> cache_by_device_type = optional(string)<br> cache_deception_armor = optional(string)<br> cache_key_fields = optional(object({<br> cookie = optional(object({<br> check_presence = optional(list(string))<br> include = optional(list(string))<br> }))<br> header = optional(object({<br> check_presence = optional(list(string))<br> exclude = optional(list(string))<br> include = optional(list(string))<br> }))<br> host = optional(object({<br> resolved = optional(bool)<br> }))<br> query_string = optional(object({<br> exclude = optional(list(string))<br> include = optional(list(string))<br> ignore = optional(bool)<br> }))<br> user = optional(object({<br> device_type = optional(bool)<br> geo = optional(bool)<br> lang = optional(bool)<br> }))<br> }))<br> cache_level = optional(string)<br> cache_on_cookie = optional(string)<br> cache_ttl_by_status = optional(list(object({<br> codes = string<br> ttl = number<br> })))<br> disable_apps = optional(bool)<br> disable_performance = optional(bool)<br> disable_railgun = optional(bool)<br> disable_security = optional(bool)<br> disable_zaraz = optional(bool)<br> edge_cache_ttl = optional(number)<br> email_obfuscation = optional(string)<br> explicit_cache_control = optional(string)<br> forwarding_url = optional(object({<br> url = string<br> status_code = number<br> }))<br> host_header_override = optional(string)<br> ip_geolocation = optional(string)<br> minify = optional(object({<br> html = optional(string)<br> css = optional(string)<br> js = optional(string)<br> }))<br> mirage = optional(string)<br> opportunistic_encryption = optional(string)<br> origin_error_page_pass_thru = optional(string)<br> polish = optional(string)<br> resolve_override = optional(string)<br> respect_strong_etag = optional(string)<br> response_buffering = optional(string)<br> rocket_loader = optional(string)<br> security_level = optional(string)<br> server_side_exclude = optional(string)<br> smart_errors = optional(string)<br> sort_query_string_for_cache = optional(string)<br> ssl = optional(string)<br> true_client_ip_header = optional(string)<br> waf = optional(string)<br> })<br> priority = optional(number)<br> status = optional(string)<br> }))</pre> | `[]` | no |
| <a name="input_page_rules"></a> [page\_rules](#input\_page\_rules) | Zone's page rules.<br>Number of allowed page rules depending on the plan:<br>"free": 3;<br>"pro", "partners\_pro": 20;<br>"business", "partners\_business": 50;<br>"enterprise", "partners\_enterprise": 125.<br>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. | <pre>list(object({<br> page_rule_name = string<br> target = string<br> actions = object({<br> always_use_https = optional(bool)<br> automatic_https_rewrites = optional(string)<br> browser_cache_ttl = optional(number)<br> browser_check = optional(string)<br> bypass_cache_on_cookie = optional(string)<br> cache_by_device_type = optional(string)<br> cache_deception_armor = optional(string)<br> cache_key_fields = optional(object({<br> cookie = optional(object({<br> check_presence = optional(list(string))<br> include = optional(list(string))<br> }))<br> header = optional(object({<br> check_presence = optional(list(string))<br> exclude = optional(list(string))<br> include = optional(list(string))<br> }))<br> host = optional(object({<br> resolved = optional(bool)<br> }))<br> query_string = optional(object({<br> exclude = optional(list(string))<br> include = optional(list(string))<br> ignore = optional(bool)<br> }))<br> user = optional(object({<br> device_type = optional(bool)<br> geo = optional(bool)<br> lang = optional(bool)<br> }))<br> }))<br> cache_level = optional(string)<br> cache_on_cookie = optional(string)<br> cache_ttl_by_status = optional(list(object({<br> codes = string<br> ttl = number<br> })))<br> disable_apps = optional(bool)<br> disable_performance = optional(bool)<br> disable_railgun = optional(bool)<br> disable_security = optional(bool)<br> disable_zaraz = optional(bool)<br> edge_cache_ttl = optional(number)<br> email_obfuscation = optional(string)<br> explicit_cache_control = optional(string)<br> forwarding_url = optional(object({<br> url = string<br> status_code = number<br> }))<br> host_header_override = optional(string)<br> ip_geolocation = optional(string)<br> minify = optional(object({<br> html = optional(string)<br> css = optional(string)<br> js = optional(string)<br> }))<br> mirage = optional(string)<br> opportunistic_encryption = optional(string)<br> origin_error_page_pass_thru = optional(string)<br> polish = optional(string)<br> resolve_override = optional(string)<br> respect_strong_etag = optional(string)<br> response_buffering = optional(string)<br> rocket_loader = optional(string)<br> security_level = optional(string)<br> server_side_exclude = optional(string)<br> smart_errors = optional(string)<br> sort_query_string_for_cache = optional(string)<br> ssl = optional(string)<br> true_client_ip_header = optional(string)<br> waf = optional(string)<br> })<br> priority = optional(number)<br> status = optional(string)<br> }))</pre> | `[]` | no |

## Outputs

Expand Down
1 change: 0 additions & 1 deletion examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
1 change: 0 additions & 1 deletion examples/page-rules-with-priorities/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
1 change: 0 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down