Changed to seconds for project and vm name.
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user