Loading README.md +31 −2 Original line number Diff line number Diff line Loading @@ -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 outputs.tf +4 −0 Original line number Diff line number Diff line Loading @@ -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}"] Loading Loading
README.md +31 −2 Original line number Diff line number Diff line Loading @@ -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
outputs.tf +4 −0 Original line number Diff line number Diff line Loading @@ -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}"] Loading