From bc4f89d9dc9439bf8b5f745eed2aaf53b2b82c6a Mon Sep 17 00:00:00 2001 From: Julio Diez Date: Mon, 18 Dec 2023 11:39:28 +0100 Subject: [PATCH] Remove 'traffic' variable, the module is not intended to manage rollouts --- modules/cloud-run-v2/main.tf | 17 ----------------- modules/cloud-run-v2/variables.tf | 11 ----------- 2 files changed, 28 deletions(-) diff --git a/modules/cloud-run-v2/main.tf b/modules/cloud-run-v2/main.tf index d9d3c6f97..f183467f6 100644 --- a/modules/cloud-run-v2/main.tf +++ b/modules/cloud-run-v2/main.tf @@ -249,23 +249,6 @@ resource "google_cloud_run_v2_service" "service" { } } - dynamic "traffic" { - for_each = var.traffic - content { - type = ( - traffic.value.latest == true - ? "TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST" - : "TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION" - ) - revision = ( - traffic.value.latest == true - ? null : "${var.name}-${traffic.key}" - ) - percent = traffic.value.percent - tag = traffic.value.tag - } - } - lifecycle { ignore_changes = [ template.0.annotations["run.googleapis.com/operation-id"], diff --git a/modules/cloud-run-v2/variables.tf b/modules/cloud-run-v2/variables.tf index 702674089..90fcfae64 100644 --- a/modules/cloud-run-v2/variables.tf +++ b/modules/cloud-run-v2/variables.tf @@ -199,17 +199,6 @@ variable "service_account_create" { default = false } -variable "traffic" { - description = "Traffic steering configuration." - type = map(object({ - latest = optional(bool) - percent = optional(number) - tag = optional(string) - })) - default = {} - nullable = false -} - variable "volumes" { description = "Named volumes in containers in name => attributes format." type = map(object({