Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Terraform based repositories
Cloudflare Access Rule Module
Commits
c7c5e79e
Commit
c7c5e79e
authored
Nov 10, 2018
by
Mike Horwath
Browse files
now can see all IDs
parent
9b1fbc4b
Pipeline
#53
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
c7c5e79e
...
...
@@ -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
View file @
c7c5e79e
...
...
@@ -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}"]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment