Andy T
Andy T

Reputation: 9881

Using Cloud Deploy to only update the Cloud Run image

I've created my Cloud Run instance using Terraform. I also have Cloud Build, Artifact Registry, and Cloud Deploy in Terraform.

When I run terraform apply my environment is created the way I want.

However, with the CI/CD pipeline that I have in place, each time that I push a change and a new revision of my Cloud Run instance is created, it removes many of the settings that I declared in TF.

I found out that it is because the service.yaml file that skaffold.yaml uses has minimal information about the Cloud Run service. The solution would be to declare the same settings in the service.yaml as those that I have in Terraform, which I think is risky because I might add/change a setting in one place and forget to update the other.

Is there a way where I can just get Cloud Deploy to run a gcloud run command that I can use to replace the container image without using a service.yaml file?

Upvotes: 0

Views: 112

Answers (0)

Related Questions