FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects

Resolve CI changes not being ignored by terraform

Merged Robin Goodall requested to merge 3-fix-ignore-changes into master
1 file
+ 10
0
Compare changes
  • Side-by-side
  • Inline
+ 10
0
@@ -37,6 +37,13 @@ resource "google_cloud_run_service" "webapp" {
# Cloud SQL instances to auto-magically make appear in the container as
# Unix sockets.
"run.googleapis.com/cloudsql-instances" = var.sql_instance_connection_name
# As mentioned at https://www.terraform.io/docs/configuration/resources.html#ignore_changes
# placeholders need to be created as the adding the key to the map is
# considered a change and not ignored by ignore_changes
"client.knative.dev/user-image" = "placeholder"
"run.googleapis.com/client-name" = "placeholder"
"run.googleapis.com/client-version" = "placeholder"
}
# See the README for information on this.
@@ -89,6 +96,9 @@ resource "google_cloud_run_service" "webapp" {
# resource be updated.
template[0].spec[0].containers[0].image,
# Also the name of the revision will change with each CI deployment
template[0].metadata[0].name,
# Some common annotations which we don't care about.
template[0].metadata[0].annotations["client.knative.dev/user-image"],
template[0].metadata[0].annotations["run.googleapis.com/client-name"],
Loading