Commit 848de25a authored by Mike Horwath's avatar Mike Horwath

set some defaults, blacklist IPs

parent 3dc760ef
Pipeline #45 canceled with stages
# TBD
# whitelist an IP
resource "cloudflare_access_rule" "whitelisted_ip" {
count = "${length(var.whitelist_ips)}"
notes = "${var.notes}"
......@@ -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)}"
}
}
......@@ -5,5 +5,11 @@ variable "configuration_value" {}
variable "zone" {}
variable "whitelist_ips" {
type = "list"
type = "list"
default = ""
}
variable "blacklist_ips" {
type = "list"
default = ""
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment