@@ -100,14 +100,6 @@ locals {
100
100
health_checked_backends = { for backend_index , backend_value in local . backends : backend_index => backend_value }
101
101
}
102
102
103
- # ======== IP ADDRESSES ====================
104
-
105
- // todo: (2025-09-22): this can be removed when all orchestrator will be rolled with internal logs collector server
106
- resource "google_compute_global_address" "orch_logs_ip" {
107
- name = " ${ var . prefix } logs-ip"
108
- }
109
-
110
-
111
103
# ======== CLOUDFLARE ====================
112
104
113
105
data "cloudflare_zone" "domain" {
@@ -441,73 +433,6 @@ resource "google_compute_security_policy" "default" {
441
433
}
442
434
}
443
435
444
- module "gce_lb_http_logs" {
445
- source = " GoogleCloudPlatform/lb-http/google"
446
- version = " ~> 12.1"
447
- name = " ${ var . prefix } external-logs-endpoint"
448
- project = var. gcp_project_id
449
- address = google_compute_global_address. orch_logs_ip . address
450
- create_address = false
451
- target_tags = [var . cluster_tag_name ]
452
- firewall_networks = [var . network_name ]
453
-
454
- labels = var. labels
455
- backends = {
456
- default = {
457
- description = null
458
- protocol = " HTTP"
459
- port = var.logs_proxy_port.port
460
- port_name = var.logs_proxy_port.name
461
- timeout_sec = 20
462
- connection_draining_timeout_sec = 1
463
- enable_cdn = false
464
- session_affinity = null
465
- affinity_cookie_ttl_sec = null
466
- custom_request_headers = null
467
- custom_response_headers = null
468
- security_policy = google_compute_security_policy.disable- bots- log- collector.self_link
469
-
470
- health_check = {
471
- check_interval_sec = null
472
- timeout_sec = null
473
- healthy_threshold = null
474
- unhealthy_threshold = null
475
- request_path = var.logs_health_proxy_port.health_path
476
- port = var.logs_health_proxy_port.port
477
- host = null
478
- logging = null
479
- }
480
-
481
- log_config = {
482
- enable = false
483
- sample_rate = 0.0
484
- }
485
-
486
- groups = [
487
- {
488
- group = var.client_instance_group
489
- balancing_mode = null
490
- capacity_scaler = null
491
- description = null
492
- max_connections = null
493
- max_connections_per_instance = null
494
- max_connections_per_endpoint = null
495
- max_rate = null
496
- max_rate_per_instance = null
497
- max_rate_per_endpoint = null
498
- max_utilization = null
499
- },
500
- ]
501
-
502
- iap_config = {
503
- enable = false
504
- oauth2_client_id = " "
505
- oauth2_client_secret = " "
506
- }
507
- }
508
- }
509
- }
510
-
511
436
# Firewalls
512
437
resource "google_compute_firewall" "default-hc" {
513
438
name = " ${ var . prefix } load-balancer-hc"
@@ -558,26 +483,6 @@ resource "google_compute_firewall" "client_proxy_firewall_ingress" {
558
483
source_ranges = [" 130.211.0.0/22" , " 35.191.0.0/16" ]
559
484
}
560
485
561
- resource "google_compute_firewall" "logs_collector_firewall_ingress" {
562
- name = " ${ var . prefix } ${ var . cluster_tag_name } -logs-collector-firewall-ingress"
563
- network = var. network_name
564
-
565
- allow {
566
- protocol = " tcp"
567
- # Health end point is already added by load balancer module automatically, but also adding it here just to make sure we don't remove it by accident
568
- ports = [var . logs_proxy_port . port , var . logs_health_proxy_port . port ]
569
- }
570
-
571
- priority = 999
572
-
573
- direction = " INGRESS"
574
- target_tags = [var . cluster_tag_name ]
575
- # Load balancer health check IP ranges
576
- # https://cloud.google.com/load-balancing/docs/health-check-concepts
577
- source_ranges = [" 130.211.0.0/22" , " 35.191.0.0/16" ]
578
- }
579
-
580
-
581
486
resource "google_compute_firewall" "internal_remote_connection_firewall_ingress" {
582
487
name = " ${ var . prefix } ${ var . cluster_tag_name } -internal-remote-connection-firewall-ingress"
583
488
network = var. network_name
@@ -764,31 +669,3 @@ resource "google_compute_security_policy_rule" "disable-consul" {
764
669
}
765
670
}
766
671
}
767
-
768
- resource "google_compute_security_policy" "disable-bots-log-collector" {
769
- name = " disable-bots-log-collector"
770
-
771
- rule {
772
- action = " allow"
773
- priority = " 300"
774
- match {
775
- expr {
776
- expression = " request.path == \" /\" && request.method == \" POST\" "
777
- }
778
- }
779
-
780
- description = " Allow POST requests to / (collecting logs)"
781
- }
782
-
783
- rule {
784
- action = " deny(403)"
785
- priority = " 2147483647"
786
- description = " Default rule, higher priority overrides it"
787
- match {
788
- versioned_expr = " SRC_IPS_V1"
789
- config {
790
- src_ip_ranges = [" *" ]
791
- }
792
- }
793
- }
794
- }
0 commit comments