Created
May 17, 2018 12:08
-
-
Save VladimirCores/72c2a19143a47a5318f41f1d9bb7a449 to your computer and use it in GitHub Desktop.
GCP - Multiple VM instances creation from console
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
for i in {1..3}; \ | |
do \ | |
gcloud compute instances create "nginxstack-$i" \ | |
--machine-type "f1-micro" \ | |
--tags nginxstack-tcp-443,nginxstack-tcp-80 \ | |
--zone us-central1-f \ | |
--image "https://www.googleapis.com/compute/v1/projects/bitnami-launchpad/global/images/bitnami-nginxstack-1-10-2-0-linux-debian-8-x86-64" \ | |
--boot-disk-size "200" --boot-disk-type "pd-standard" \ | |
--boot-disk-device-name "nginxstack-$i"; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Firewall rules:
gcloud compute firewall-rules create nginx-firewall
--allow tcp:80,tcp:443
--target-tags nginxstack-tcp-80,nginxstack-tcp-443