Last active
February 11, 2021 15:42
-
-
Save rynop/11b498cfeda0be5a10b34e1d966d33f5 to your computer and use it in GitHub Desktop.
Clone WAF IP Set
This file contains hidden or 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
# This example exports a regional rule, targeted for importing into cloudfront | |
aws wafv2 get-ip-set --scope REGIONAL --output=json --name=my-ip-set --id foo | jq -c '.IPSet | del(.Id,.ARN) + {Scope: "CLOUDFRONT"}' > my-ip-set.json | |
This file contains hidden or 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
# Cloudfront is always us-east-1 | |
aws wafv2 create-ip-set --region=us-east-1 --cli-input-json file://my-ip-set.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See WAF cli docs at https://docs.aws.amazon.com/cli/latest/reference/wafv2/get-ip-set.html and https://docs.aws.amazon.com/cli/latest/reference/wafv2/create-ip-set.html