Commit c7c5e79e authored by Mike Horwath's avatar Mike Horwath

now can see all IDs

parent 9b1fbc4b
Pipeline #53 failed with stages
......@@ -2,12 +2,41 @@
[Terraform cloudflare_access_rule](https://www.terraform.io/docs/providers/cloudflare/r/access_rule.html)
This module will create rules in Cloudflare.
Suggestion: you should use durable state storage.
## usage example
```
module "cloudflare_whitelist" {
source = "git::https://grot.geeks.org/tf/cloudflare-access-rule-module.git"
notes = "Whitelisted IPs"
whitelist_ips = [
"192.168.241.0/24",
"192.168.242.0/24"
]
}
module "cloudflare_blacklist" {
source = "git::https://grot.geeks.org/tf/cloudflare-access-rule-module.git"
notes = "Blacklisted IPs"
whitelist_ips = [
"10.22.0.0/16",
"10.24.0.0/24"
]
}
```
## required variables
N/A
## optional variables
* `notes` - a comment for the entry
* `whitelist_ips` - list of IPs to whitelist using Terraform list format
* `blacklist_ips` - list of IPs to whitelist using Terraform list format
## outputs
* `id` - The access rule ID.
* `zone_id` - The DNS zone ID.
* `whitelist_id` - The access rule ID list for whitelisted IPs
* `blacklist_id` - The access rule ID list for blacklisted IPs
\ No newline at end of file
......@@ -2,6 +2,10 @@ output "whitelist_id" {
value = ["${cloudflare_access_rule.whitelisted_ip.*.id}"]
}
output "blacklist_id" {
value = ["${cloudflare_access_rule.blacklisted_ip.*.id}"]
}
# does not work
# output "whitelist_zone_id" {
# value = ["${cloudflare_access_rule.whitelisted_ip.*.zone_id}"]
......
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