gcloud - Create projects gcloud cli
Table of Contents
Get your billing account ID
gcloud alpha billing accounts list
Set Variables
export NAME=$(whoami)-$(date +%y%m%d)
export PROJECT=${NAME}-draft
export CLUSTER=${PROJECT}-cluster
export ZONE=[[YOUR-PREFERRED-GCP-ZONE]] # us-west1-c
export BILLING=[[YOUR-BILLING-ACCOUNT]]
#fieldnotes/go
Create project
gcloud projects create ${PROJECT}
gcloud alpha billing accounts projects link ${PROJECT} \
--account-id=${BILLING}
Enable APIs
gcloud service-management enable compute-component.googleapis.com \
--project=$PROJECT
gcloud service-management enable container.googleapis.com \
--project=$PROJECT
DELETE Project
When you’re done
gcloud projects delete ${PROJECT} --quiet