/cloud-run-deploy-via-api-go

Primary LanguageGoApache License 2.0Apache-2.0

Programmatically managing Cloud Run services via API (Go)

This repository shows you how you can use Google Cloud Go client libraries to manage Cloud Run services.

See main.go.

Agenda:

  • How to check if a Cloud Run service exists
  • How to create a new Cloud Run service
  • How to wait for the service to become "ready"
  • How to give IAM permissions to make the service public
  • How to release a new Revision and split traffic v1 and v2
  • How to delete a service

This is not an official code sample and is provided for illustrative purposes.