Skip to content

Commit

Permalink
Ignore Cloud Run system annotations/labels
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wiktorn committed Jun 13, 2023
1 parent 0d0b37b commit 30ae108
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/cloud-run/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
]
}
}
Expand Down

0 comments on commit 30ae108

Please sign in to comment.