Created
December 3, 2019 03:27
-
-
Save davidmukiibi/abf240cf50ca44b95ac7d6952c6d31f6 to your computer and use it in GitHub Desktop.
script to grant circleci ci ingress access to system behind aws firewall
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 authorize-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