Created
January 28, 2016 13:29
-
-
Save pkazmierczak/68601e272d12a4745331 to your computer and use it in GitHub Desktop.
WAF IPSet with troposphere
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from troposphere import Template | |
from troposphere.waf import IPSet | |
t = Template() | |
t.add_description("CF Template for setting IP ranges for whitelisting on the WAF.") | |
Whitelist1 = t.add_resource(IPSet( | |
"internaladdresses", | |
Name="Internal_addresses", | |
IPSetDescriptors=[ | |
{ | |
"Type": "IPV4", | |
"Value": "192.0.2.44/32" | |
}, | |
{ | |
"Type": "IPV4", | |
"Value": "192.0.7.0/24" | |
} | |
] | |
)) | |
print(t.to_json()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment