Skip to content
Commits on Source (2)
......@@ -7,3 +7,7 @@
## required variables
## optional variables
## outputs
* `id` - The access rule ID.
* `zone_id` - The DNS zone ID.
output "whitelist_id" {
value = ["${cloudflare_access_rule.whitelisted_ip.*.id}"]
}
output "whitelist_zone_id" {
value = ["${cloudflare_access_rule.whitelisted_ip.*.zone_id}"]
}
# TBD
resource "cloudflare_access_rule" "whitelisted_ip" {
count = "${length(var.whitelist_ips)}"
notes = "Whitelist IPs from Terraform"
mode = "whitelist"
configuration {
target = "ip_range"
value = "${element(var.whitelist_ips, count.index)}"
}
}
variable "notes" {}
variable "mode" {}
variable "configuration_target" {}
variable "configuration_value" {}
variable "zone" {}
variable "whitelist_ips" {
type = "list"
}