Created
December 3, 2019 03:21
-
-
Save davidmukiibi/3be1185a44e251d35413726cd69508a4 to your computer and use it in GitHub Desktop.
bash Script to revoke ingress access for circleci
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
#!/bin/bash | |
set -ex | |
public_ip_address=$(curl -q http://checkip.amazonaws.com) | |
/root/bin/aws ec2 revoke-security-group-ingress --group-id sg-006b570caa40214f1 --ip-permissions "[{\"IpProtocol\": \"tcp\", \"FromPort\": 443, \"ToPort\": 443, \"IpRanges\": [{\"CidrIp\": \"${public_ip_address}/32\"}]}]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment