FAQ | This is a LIVE service | Changelog

Skip to content

Resolve "Support explicitly specifying image name"

Arun Patel requested to merge 21-explicit-image-name into v4

Closes #21 (closed)

The optional variable image_name determines what will be deployed, and TF correctly determines "no changes" if it's the same image as currently deployed.

However, if image_name is empty, to avoid either TF attempting to deploy a null image, or deploying the fall-back hello:latest image, existing_image_name must be supplied.

existing_image_name needs to be determined outside of this module, and I thought it safer to make it a mandatory variable.

Not supplying image_name keeps any existing image (there should be no image based changes).

The module now includes the data resource which reads any existing Cloud Run instance and determines the currently deployed image. This behaviour relies on Terraform performing the refresh walk first, see below for concerns.

Edited by Arun Patel

Merge request reports