diff --git a/locals.tf b/locals.tf index 6ba5555d9f487d674d99482a8b4e497bab83cc10..ecddd7a1a6a4e8c4bff7dee65a8ef8c19390d5d1 100644 --- a/locals.tf +++ b/locals.tf @@ -39,12 +39,6 @@ locals { load-balancer = "internal-and-cloud-load-balancing" }, var.ingress_style, var.allowed_ingress) - # Do we need to enable the 'beta' launch stage - only required if certain beta - # functionality is being used, or if `enable_beta_launch_stage` is set downstream. - enable_beta_launch_stage = ( - var.enable_beta_launch_stage || length(var.secrets_volume) != 0 || length(var.secrets_envars) != 0 - ) - # Whether we should monitor the custom domain - only possible if there are a dns names # set and unauthenticated invocation is enabled. can_monitor_custom_dns = length(local.dns_names) > 0 && var.allow_unauthenticated_invocations diff --git a/main.tf b/main.tf index edd1277dd32f45c180eb652207051a478289a817..36b7ae001f4f56ac8d9b1278d287038ce1310b1b 100644 --- a/main.tf +++ b/main.tf @@ -44,7 +44,7 @@ resource "google_cloud_run_service" "webapp" { }, # Add the beta launch stage if required. - local.enable_beta_launch_stage ? { + var.enable_beta_launch_stage ? { # Required to be able to set ingress type and secrets volume mounts "run.googleapis.com/launch-stage" : "BETA", } : {}, @@ -184,7 +184,7 @@ resource "google_cloud_run_service" "webapp" { # These are only changed when "run.googleapis.com/launch-stage" is "BETA". # It's non-trivial to make ignore_changes dependent on input variables so # we always ignore these annotations even if, strictly speaking, we only - # need to do so is local.enable_beta_launch_stage is true. + # need to do so is var.enable_beta_launch_stage is true. metadata[0].annotations["serving.knative.dev/creator"], metadata[0].annotations["serving.knative.dev/lastModifier"],