Skip to content

Commit b312132

Browse files
committed
adjust sample rate for log configuration and enable QUIC for HTTPS proxy
1 parent db6a751 commit b312132

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
lines changed

terraform/modules/cdn-glb/main.tf

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ resource "google_compute_backend_service" "backend" {
5858

5959
log_config {
6060
enable = true
61-
sample_rate = 1
61+
sample_rate = 0.1
6262
}
6363
}
6464

@@ -85,16 +85,12 @@ resource "google_compute_target_https_proxy" "https_proxy" {
8585
project = var.project
8686
url_map = google_compute_url_map.url_map.id
8787
ssl_certificates = [google_compute_managed_ssl_certificate.ssl_cert.id]
88+
quic_override = "ENABLE"
8889
}
8990

90-
# HTTP Target Proxy (for HTTP to HTTPS redirect)
91-
resource "google_compute_target_http_proxy" "http_proxy" {
92-
name = coalesce(var.http_proxy_name, "${var.load_balancer_name}-http-proxy")
93-
project = var.project
94-
url_map = google_compute_url_map.url_map.id
95-
}
9691

9792
# Global Forwarding Rule for HTTPS
93+
# Org constraint: Forwarding Rule projects/httparchive/global/forwardingRules/httparchive-load-balancer-http-forwarding-rule of type EXTERNAL_HTTP_HTTPS is not allowed
9894
resource "google_compute_global_forwarding_rule" "https_forwarding_rule" {
9995
name = coalesce(var.https_forwarding_rule_name, "${var.load_balancer_name}-https-forwarding-rule")
10096
project = var.project
@@ -107,18 +103,8 @@ resource "google_compute_global_forwarding_rule" "https_forwarding_rule" {
107103
load_balancing_scheme = "EXTERNAL_MANAGED"
108104
external_managed_backend_bucket_migration_testing_percentage = 0
109105
network_tier = "PREMIUM"
110-
}
111106

112-
# Global Forwarding Rule for HTTP
113-
resource "google_compute_global_forwarding_rule" "http_forwarding_rule" {
114-
name = coalesce(var.http_forwarding_rule_name, "${var.load_balancer_name}-http-forwarding-rule")
115-
project = var.project
116-
target = google_compute_target_http_proxy.http_proxy.id
117-
port_range = "80-80"
118-
ip_protocol = "TCP"
119-
ip_address = "35.190.48.74"
120-
ip_version = "IPV4"
121-
load_balancing_scheme = "EXTERNAL_MANAGED"
122-
external_managed_backend_bucket_migration_testing_percentage = 0
123-
network_tier = "PREMIUM"
107+
lifecycle {
108+
prevent_destroy = true
109+
}
124110
}

terraform/modules/cdn-glb/outputs.tf

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
output "load_balancer_ip_http" {
2-
description = "The IP address of the HTTP load balancer"
3-
value = google_compute_global_forwarding_rule.http_forwarding_rule.ip_address
4-
}
5-
6-
output "load_balancer_ip_https" {
1+
output "load_balancer_ip" {
72
description = "The IP address of the HTTPS load balancer"
83
value = google_compute_global_forwarding_rule.https_forwarding_rule.ip_address
94
}

0 commit comments

Comments
 (0)