Loading rule.tf +13 −2 Original line number Diff line number Diff line # TBD # whitelist an IP resource "cloudflare_access_rule" "whitelisted_ip" { count = "${length(var.whitelist_ips)}" notes = "${var.notes}" Loading @@ -10,3 +9,15 @@ resource "cloudflare_access_rule" "whitelisted_ip" { value = "${element(var.whitelist_ips, count.index)}" } } # blacklist an IP resource "cloudflare_access_rule" "blacklisted_ip" { count = "${length(var.blacklist_ips)}" notes = "${var.notes}" mode = "block" configuration { target = "ip_range" value = "${element(var.blacklist_ips, count.index)}" } } variables.tf +7 −1 Original line number Diff line number Diff line Loading @@ -6,4 +6,10 @@ variable "zone" {} variable "whitelist_ips" { type = "list" default = "" } variable "blacklist_ips" { type = "list" default = "" } Loading
rule.tf +13 −2 Original line number Diff line number Diff line # TBD # whitelist an IP resource "cloudflare_access_rule" "whitelisted_ip" { count = "${length(var.whitelist_ips)}" notes = "${var.notes}" Loading @@ -10,3 +9,15 @@ resource "cloudflare_access_rule" "whitelisted_ip" { value = "${element(var.whitelist_ips, count.index)}" } } # blacklist an IP resource "cloudflare_access_rule" "blacklisted_ip" { count = "${length(var.blacklist_ips)}" notes = "${var.notes}" mode = "block" configuration { target = "ip_range" value = "${element(var.blacklist_ips, count.index)}" } }
variables.tf +7 −1 Original line number Diff line number Diff line Loading @@ -6,4 +6,10 @@ variable "zone" {} variable "whitelist_ips" { type = "list" default = "" } variable "blacklist_ips" { type = "list" default = "" }