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
This commit is contained in:
Wiktor Niesiobędzki
2023-06-13 07:18:08 +00:00
committed by Wiktor Niesiobędzki
parent 0d0b37b599
commit 30ae108c89

View File

@@ -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"]
]
}
}