Skip to content

Commit

Permalink
Define firewall_rules object
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanhorstmann committed Dec 21, 2023
1 parent 43aa65a commit 4c623bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion page_rule.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ resource "cloudflare_page_rule" "default" {
rocket_loader = lookup(each.value.actions, "rocket_loader", null)
security_level = lookup(each.value.actions, "security_level", null)
server_side_exclude = lookup(each.value.actions, "server_side_exclude", null)
smart_errors = lookup(each.value.actions, "smart_errors", null)
sort_query_string_for_cache = lookup(each.value.actions, "sort_query_string_for_cache", null)
ssl = lookup(each.value.actions, "ssl", null)
true_client_ip_header = lookup(each.value.actions, "true_client_ip_header", null)
Expand Down
11 changes: 9 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ variable "healthchecks" {
}

variable "firewall_rules" {
type = any
type = list(object({
action = string
description = string
expression = string
paused = optional(bool)
priority = optional(number)
products = optional(list(string))
ref = optional(string)
}))
default = null
description = <<-DOC
paused:
Expand Down Expand Up @@ -189,7 +197,6 @@ variable "page_rules" {
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)
Expand Down

0 comments on commit 4c623bc

Please sign in to comment.