Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of SSL certificates in external load balancer modules #2780

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/net-lb-app-ext-regional/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ resource "google_compute_region_target_https_proxy" "default" {
region = var.region
description = var.description
certificate_manager_certificates = var.https_proxy_config.certificate_manager_certificates
ssl_certificates = local.proxy_ssl_certificates
ssl_certificates = length(local.proxy_ssl_certificates) == 0 ? null : local.proxy_ssl_certificates
ssl_policy = var.https_proxy_config.ssl_policy
url_map = google_compute_region_url_map.default.id
}
2 changes: 1 addition & 1 deletion modules/net-lb-app-ext/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ resource "google_compute_target_https_proxy" "default" {
certificate_map = var.https_proxy_config.certificate_map
certificate_manager_certificates = var.https_proxy_config.certificate_manager_certificates
quic_override = var.https_proxy_config.quic_override
ssl_certificates = local.proxy_ssl_certificates
ssl_certificates = length(local.proxy_ssl_certificates) == 0 ? null : local.proxy_ssl_certificates
ssl_policy = var.https_proxy_config.ssl_policy
url_map = google_compute_url_map.default.id
server_tls_policy = var.https_proxy_config.mtls_policy
Expand Down
16 changes: 6 additions & 10 deletions modules/net-lb-app-int/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,12 @@ resource "google_compute_region_target_http_proxy" "default" {
}

resource "google_compute_region_target_https_proxy" "default" {
count = var.protocol == "HTTPS" ? 1 : 0
project = var.project_id
region = var.region
name = var.name
description = var.description
ssl_certificates = (
length(local.proxy_ssl_certificates) == 0
? null
: local.proxy_ssl_certificates
)
count = var.protocol == "HTTPS" ? 1 : 0
project = var.project_id
region = var.region
name = var.name
description = var.description
ssl_certificates = length(local.proxy_ssl_certificates) == 0 ? null : local.proxy_ssl_certificates
ssl_policy = var.https_proxy_config.ssl_policy
url_map = google_compute_region_url_map.default.id
certificate_manager_certificates = var.https_proxy_config.certificate_manager_certificates
Expand Down
Loading