Changed to seconds for project and vm name.

This commit is contained in:
2021-01-13 16:22:50 +13:00
parent ae88b340a0
commit 035aca3cdf
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
# Once we have a project we can create a new virtual machine.
# Once we have a project we can create a new virtual machine. To create a virtual machine we need to ensure compute engine apis are enabled.
# Tangle the shell block below to a shell script by pressing *, b t* in emacs command mode:

View File

@ -57,7 +57,7 @@ Tangle the shell block below to a shell script by pressing *, b t* in emacs comm
#+NAME: Create a new google cloud project
#+begin_src bash :shebang #!/bin/bash :tangle 2-configure-gcp-project.sh
# Create a project id based on date
export gcp_project_id="gitlab-gcp-"$(date +"%Y-%m-%d")
export gcp_project_id="gitlab-gcp-"$(date +"%s")
# Create new project using a random project id
gcloud projects create $gcp_project_id
@ -80,7 +80,7 @@ Tangle the shell block below to a shell script by pressing *, b t* in emacs comm
gcloud services enable compute.googleapis.com
# Create name for virtual machine based on date
export gcp_machine_name="gitlab-gcp-"$(date +"%Y-%m-%d")
export gcp_machine_name="gitlab-gcp-"$(date +"%s")
# Create the new machine
gcloud compute instances create $gcp_machine_name --zone australia-southeast1-a