Skip to content

Instantly share code, notes, and snippets.

@hanksudo
Last active Aug 2, 2020
Embed
What would you like to do?
Google Cloud Platform Notes

Google Cloud Platform Notes

Installation

brew cask install google-cloud-sdk

Config

gcloud config set disable_usage_reporting true
gcloud config list
gcloud config set project $PROJECT_NAME

Region and Zones

gcloud config set compute/region asia-northeast1
gcloud config set compute/zone asia-northeast1-a
gcloud config set functions/region asia-northeast1

Projects

gcloud projects list
gcloud projects create $PROJECT_NAME
gcloud projects delete $PROJECT_NAME

Services

# List
gcloud services list --available

# Enable
gcloud services enable $SERVICE_NAME
gcloud services enable cloudfunctions
gcloud services enable kgsearch.googleapis.com

Functions

# deploy
gcloud functions deploy $FUNCTION_NAME --project $PROJECT_NAME --runtime go113 --trigger-http

# Logs

gcloud functions logs read --limit 100

# delete
gcloud functions delete $FUNCTION_NAME --region us-central1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment