From 30ae108c892bb49470eed8915006a9858be1ae2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20Niesiob=C4=99dzki?= Date: Tue, 13 Jun 2023 07:18:08 +0000 Subject: [PATCH] Ignore Cloud Run system annotations/labels Ignore explicitly: * metadata.0.annotations["run.googleapis.com/operation-id"], * template.0.metadata.0.labels["run.googleapis.com/startupProbeType"] To remove permdiff in terraform plan. Not ignoring all changes in annotations as it implements some of the functionality and it prevents detecting drift. Related: #1435, #1269 --- modules/cloud-run/main.tf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/cloud-run/main.tf b/modules/cloud-run/main.tf index f982081be4..6b1177b3e4 100644 --- a/modules/cloud-run/main.tf +++ b/modules/cloud-run/main.tf @@ -304,7 +304,8 @@ resource "google_cloud_run_service" "service" { lifecycle { ignore_changes = [ - metadata.0.annotations + metadata.0.annotations["run.googleapis.com/operation-id"], + template.0.metadata.0.labels["run.googleapis.com/startupProbeType"] ] } }