Automating tasks for Cloud Run and Cloud Functions
In this section of the chapter, we will review numerous tasks related to Cloud Run and Cloud Functions that you can automate using Cloud Build.
Deploying services and jobs to Cloud Run
The first, and perhaps most simple task you can automate is doing a build and deployment of a container image. Earlier in this book, in Chapter 4, Build Configuration and Schema and Chapter 7, Automating Deployment with Terraform and Cloud Build we have reviewed multiple ways to use the Google Cloud APIs, namely the following:
- gcloud
- Terraform
Both wrap the APIs that allow developers to use the Google Cloud APIs to manage resources, including Cloud Run services and jobs.
From a developer experience perspective, when considering how to interact with Cloud Run from Cloud Build, it is preferred to use gcloud
as it can be easier to reason about for developers looking to keep operational overhead to a minimum. Terraform is written...