Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save VladimirCores/72c2a19143a47a5318f41f1d9bb7a449 to your computer and use it in GitHub Desktop.
Save VladimirCores/72c2a19143a47a5318f41f1d9bb7a449 to your computer and use it in GitHub Desktop.
GCP - Multiple VM instances creation from console
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
@VladimirCores
Copy link
Author

Firewall rules:
gcloud compute firewall-rules create nginx-firewall
--allow tcp:80,tcp:443
--target-tags nginxstack-tcp-80,nginxstack-tcp-443

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment