Skip to content

Commit 1e1f396

Browse files
committed
Updating cloudflare class syntax
1 parent 052ee8a commit 1e1f396

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

manifests/cloudflare.pp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
class dofirewall::cloudflare {
33

44
# from https://www.cloudflare.com/ips-v4
5-
$cloudflare_ips = {
6-
"199.27.128.0/21" => {},
7-
"173.245.48.0/20" => {},
8-
"103.21.244.0/22" => {},
9-
"103.22.200.0/22" => {},
10-
"103.31.4.0/22" => {},
11-
"141.101.64.0/18" => {},
12-
"108.162.192.0/18" => {},
13-
"190.93.240.0/20" => {},
14-
"188.114.96.0/20" => {},
15-
"197.234.240.0/22" => {},
16-
"198.41.128.0/17" => {},
17-
"162.158.0.0/15" => {},
18-
}
5+
$cloudflare_ips = [
6+
"199.27.128.0/21",
7+
"173.245.48.0/20",
8+
"103.21.244.0/22",
9+
"103.22.200.0/22",
10+
"103.31.4.0/22",
11+
"141.101.64.0/18",
12+
"108.162.192.0/18",
13+
"190.93.240.0/20",
14+
"188.114.96.0/20",
15+
"197.234.240.0/22",
16+
"198.41.128.0/17",
17+
"162.158.0.0/15",
18+
]
1919

2020
define allow_web_from {
2121
firewall { "110 accept web traffic: $title":
@@ -26,5 +26,5 @@
2626
}
2727
}
2828

29-
create_resources(allow_web_from, $cloudflare_ips)
29+
allow_web_from { $cloudflare_ips: }
3030
}

0 commit comments

Comments
 (0)