Created
July 19, 2020 18:17
-
-
Save mesmacosta/93918da94fa6a099dc25366c1d30dc4c to your computer and use it in GitHub Desktop.
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
| # Variables | |
| INSTANCE_IP=$(curl -s api.ipify.org) | |
| INSTANCE_CIDR=$INSTANCE_IP/32 | |
| ARRAY=("https-api-remote-k8s-local" "ssh-external-to-master-remote-k8s-local" "ssh-external-to-node-remote-k8s-local") | |
| for item in ${ARRAY[@]} | |
| do | |
| echo "Updating firewall-rule $item source-range to $INSTANCE_CIDR" | |
| gcloud compute firewall-rules update $item --source-ranges=$INSTANCE_CIDR | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment