Ensure compute engine apis enabled and zone declared.

This commit is contained in:
2021-01-13 14:57:48 +13:00
parent 029a535f52
commit a01dec90fe
2 changed files with 9 additions and 3 deletions

View File

@ -7,8 +7,11 @@
# Tangle the shell block below to a shell script by pressing *, b t* in emacs command mode:
# Ensure compute engine apis are enabled in the project
gcloud services enable compute.googleapis.com
# Create name for virtual machine based on date
export gcp_machine_name="gitlab-gcp-"$(date +"%Y-%m-%d")
# Create the new machine
gcloud compute instances create $gcp_machine_name
gcloud compute instances create $gcp_machine_name --zone australia-southeast1-a