From 52a26bafc7b5972a6758bb571fb1eee70d9c02bc Mon Sep 17 00:00:00 2001 From: Karim Wadie Date: Thu, 23 Feb 2023 18:54:17 +0100 Subject: [PATCH] fix cloud run new api change for annotations --- terraform/modules/bigquery/main.tf | 3 ++- terraform/modules/cloud-run/main.tf | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/terraform/modules/bigquery/main.tf b/terraform/modules/bigquery/main.tf index 211fd07..e508ba8 100644 --- a/terraform/modules/bigquery/main.tf +++ b/terraform/modules/bigquery/main.tf @@ -37,7 +37,8 @@ resource "google_bigquery_table" "logging_table" { deletion_protection = true - labels = var.common_labels + # TODO: labels causes Terraform to force replace the table at each deployment for some reason which we don't want to do for the log table containing history logs + # labels = var.common_labels } diff --git a/terraform/modules/cloud-run/main.tf b/terraform/modules/cloud-run/main.tf index 99ba5af..8bd2187 100644 --- a/terraform/modules/cloud-run/main.tf +++ b/terraform/modules/cloud-run/main.tf @@ -42,15 +42,19 @@ resource "google_cloud_run_service" "service" { } } } - metadata { annotations = { "autoscaling.knative.dev/maxScale" = var.max_containers - "run.googleapis.com/ingress" : "internal" + #"run.googleapis.com/ingress" : "internal" } - labels = var.common_labels } + } + metadata { + annotations = { + "run.googleapis.com/ingress" : "internal" + } + labels = var.common_labels } traffic {