FAQ | This is a LIVE service | Changelog

Commit 4644c087 authored by Dr Rich Wareham's avatar Dr Rich Wareham
Browse files

locals.tf: fix logic used to determine if domains can be monitored

parent 5c3c5876
Pipeline #149934 passed with stage
in 43 seconds
......@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [4.1.2] - 2022-01-10
### Fixed
- Correct logic used to decide if custom domains can be monitored.
## [4.1.1] - 2022-01-06
### Fixed
- Remove use of hard-coded resource name in data resource.
......
......@@ -45,9 +45,9 @@ locals {
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 is a dns_name
# set and unauthenticated invocation is enabled
can_monitor_custom_dns = var.dns_name != "" && var.allow_unauthenticated_invocations
# 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
# Holds which VPC connector can be used for the auth proxy Cloud Function egress settings
auth_proxy_egress_connector = var.enable_static_egress_ip ? google_vpc_access_connector.static-ip-connector[0].id : var.auth_proxy_egress_connector
......@@ -61,9 +61,12 @@ locals {
"enable_egress_connector" = local.webapp_allowed_ingress != "all"
},
},
local.can_monitor_custom_dns ? { (var.dns_name) = {
"enable_auth_proxy" = local.webapp_allowed_ingress == "internal",
"enable_egress_connector" = local.webapp_allowed_ingress == "internal"
} } : {}
local.can_monitor_custom_dns ? {
for dns_name in local.dns_names :
(dns_name) => {
"enable_auth_proxy" = local.webapp_allowed_ingress == "internal",
"enable_egress_connector" = local.webapp_allowed_ingress == "internal"
}
} : {}
)
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment