Skip to content

Commit 9544d70

Browse files
authored
Remove whois networking from the proxy (#2976)
1 parent 50a6399 commit 9544d70

File tree

7 files changed

+3
-201
lines changed

7 files changed

+3
-201
lines changed

proxy/terraform/example_config.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,4 @@ module "proxy" {
1212
gcr_project_name = "YOUR_GCR_PROJECT"
1313
proxy_domain_name = "YOUR_PROXY_DOMAIN"
1414
proxy_certificate_bucket = "YOUR_CERTIFICATE_BUCKET"
15-
16-
# Uncomment to disable forwarding of whois HTTP interfaces.
17-
# public_web_whois = 0
1815
}

proxy/terraform/modules/networking.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module "proxy_networking" {
99
proxy_ports = var.proxy_ports
1010
proxy_domain = google_dns_managed_zone.proxy_domain.name
1111
proxy_domain_name = google_dns_managed_zone.proxy_domain.dns_name
12-
public_web_whois = var.public_web_whois
1312
}
1413

1514
module "proxy_networking_canary" {
@@ -19,5 +18,4 @@ module "proxy_networking_canary" {
1918
proxy_ports = var.proxy_ports_canary
2019
proxy_domain = google_dns_managed_zone.proxy_domain.name
2120
proxy_domain_name = google_dns_managed_zone.proxy_domain.dns_name
22-
public_web_whois = var.public_web_whois
2321
}

proxy/terraform/modules/networking/dns.tf

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,3 @@ resource "google_dns_record_set" "proxy_epp_aaaa_record" {
1313
managed_zone = var.proxy_domain
1414
rrdatas = [google_compute_global_address.proxy_ipv6_address.address]
1515
}
16-
17-
resource "google_dns_record_set" "proxy_whois_a_record" {
18-
name = "whois${var.suffix}.${var.proxy_domain_name}"
19-
type = "A"
20-
ttl = 300
21-
managed_zone = var.proxy_domain
22-
rrdatas = [google_compute_global_address.proxy_ipv4_address.address]
23-
}
24-
25-
resource "google_dns_record_set" "proxy_whois_aaaa_record" {
26-
name = "whois${var.suffix}.${var.proxy_domain_name}"
27-
type = "AAAA"
28-
ttl = 300
29-
managed_zone = var.proxy_domain
30-
rrdatas = [google_compute_global_address.proxy_ipv6_address.address]
31-
}

proxy/terraform/modules/networking/loadbalancer.tf

Lines changed: 0 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ resource "google_compute_firewall" "proxy_firewall" {
1717

1818
ports = [
1919
var.proxy_ports["epp"],
20-
var.proxy_ports["whois"],
2120
var.proxy_ports["health_check"],
22-
var.proxy_ports["http-whois"],
23-
var.proxy_ports["https-whois"],
2421
]
2522
}
2623

@@ -44,21 +41,6 @@ resource "google_compute_health_check" "proxy_health_check" {
4441
}
4542
}
4643

47-
resource "google_compute_health_check" "proxy_http_health_check" {
48-
name = "proxy-http-health-check${var.suffix}"
49-
50-
http_health_check {
51-
host = "health-check.invalid"
52-
port = var.proxy_ports["http-whois"]
53-
request_path = "/"
54-
}
55-
}
56-
57-
resource "google_compute_url_map" "proxy_url_map" {
58-
name = "proxy-url-map${var.suffix}"
59-
default_service = google_compute_backend_service.http_whois_backend_service.self_link
60-
}
61-
6244
resource "google_compute_backend_service" "epp_backend_service" {
6345
name = "epp-backend-service${var.suffix}"
6446
protocol = "TCP"
@@ -82,97 +64,12 @@ resource "google_compute_backend_service" "epp_backend_service" {
8264
]
8365
}
8466

85-
resource "google_compute_backend_service" "whois_backend_service" {
86-
name = "whois-backend-service${var.suffix}"
87-
protocol = "TCP"
88-
timeout_sec = 60
89-
port_name = "whois${var.suffix}"
90-
91-
backend {
92-
group = var.proxy_instance_groups["americas"]
93-
}
94-
95-
backend {
96-
group = var.proxy_instance_groups["emea"]
97-
}
98-
99-
backend {
100-
group = var.proxy_instance_groups["apac"]
101-
}
102-
103-
health_checks = [
104-
google_compute_health_check.proxy_health_check.self_link,
105-
]
106-
}
107-
108-
resource "google_compute_backend_service" "https_whois_backend_service" {
109-
name = "https-whois-backend-service${var.suffix}"
110-
protocol = "TCP"
111-
timeout_sec = 60
112-
port_name = "https-whois${var.suffix}"
113-
114-
backend {
115-
group = var.proxy_instance_groups["americas"]
116-
}
117-
118-
backend {
119-
group = var.proxy_instance_groups["emea"]
120-
}
121-
122-
backend {
123-
group = var.proxy_instance_groups["apac"]
124-
}
125-
126-
health_checks = [
127-
google_compute_health_check.proxy_health_check.self_link,
128-
]
129-
}
130-
131-
resource "google_compute_backend_service" "http_whois_backend_service" {
132-
name = "http-whois-backend-service${var.suffix}"
133-
protocol = "HTTP"
134-
timeout_sec = 60
135-
port_name = "http-whois${var.suffix}"
136-
137-
backend {
138-
group = var.proxy_instance_groups["americas"]
139-
}
140-
141-
backend {
142-
group = var.proxy_instance_groups["emea"]
143-
}
144-
145-
backend {
146-
group = var.proxy_instance_groups["apac"]
147-
}
148-
149-
health_checks = [
150-
google_compute_health_check.proxy_http_health_check.self_link,
151-
]
152-
}
153-
15467
resource "google_compute_target_tcp_proxy" "epp_tcp_proxy" {
15568
name = "epp-tcp-proxy${var.suffix}"
15669
proxy_header = "PROXY_V1"
15770
backend_service = google_compute_backend_service.epp_backend_service.self_link
15871
}
15972

160-
resource "google_compute_target_tcp_proxy" "whois_tcp_proxy" {
161-
name = "whois-tcp-proxy${var.suffix}"
162-
proxy_header = "PROXY_V1"
163-
backend_service = google_compute_backend_service.whois_backend_service.self_link
164-
}
165-
166-
resource "google_compute_target_tcp_proxy" "https_whois_tcp_proxy" {
167-
name = "https-whois-tcp-proxy${var.suffix}"
168-
backend_service = google_compute_backend_service.https_whois_backend_service.self_link
169-
}
170-
171-
resource "google_compute_target_http_proxy" "http_whois_http_proxy" {
172-
name = "http-whois-tcp-proxy${var.suffix}"
173-
url_map = google_compute_url_map.proxy_url_map.self_link
174-
}
175-
17673
resource "google_compute_global_forwarding_rule" "epp_ipv4_forwarding_rule" {
17774
name = "epp-ipv4-forwarding-rule${var.suffix}"
17875
ip_address = google_compute_global_address.proxy_ipv4_address.address
@@ -186,49 +83,3 @@ resource "google_compute_global_forwarding_rule" "epp_ipv6_forwarding_rule" {
18683
target = google_compute_target_tcp_proxy.epp_tcp_proxy.self_link
18784
port_range = "700"
18885
}
189-
190-
resource "google_compute_global_forwarding_rule" "whois_ipv4_forwarding_rule" {
191-
name = "whois-ipv4-forwarding-rule${var.suffix}"
192-
ip_address = google_compute_global_address.proxy_ipv4_address.address
193-
target = google_compute_target_tcp_proxy.whois_tcp_proxy.self_link
194-
port_range = "43"
195-
}
196-
197-
resource "google_compute_global_forwarding_rule" "whois_ipv6_forwarding_rule" {
198-
name = "whois-ipv6-forwarding-rule${var.suffix}"
199-
ip_address = google_compute_global_address.proxy_ipv6_address.address
200-
target = google_compute_target_tcp_proxy.whois_tcp_proxy.self_link
201-
port_range = "43"
202-
}
203-
204-
resource "google_compute_global_forwarding_rule" "https_whois_ipv4_forwarding_rule" {
205-
name = "https-whois-ipv4-forwarding-rule${var.suffix}"
206-
ip_address = google_compute_global_address.proxy_ipv4_address.address
207-
target = google_compute_target_tcp_proxy.https_whois_tcp_proxy.self_link
208-
port_range = "443"
209-
count = var.public_web_whois
210-
}
211-
212-
resource "google_compute_global_forwarding_rule" "https_whois_ipv6_forwarding_rule" {
213-
name = "https-whois-ipv6-forwarding-rule${var.suffix}"
214-
ip_address = google_compute_global_address.proxy_ipv6_address.address
215-
target = google_compute_target_tcp_proxy.https_whois_tcp_proxy.self_link
216-
port_range = "443"
217-
count = var.public_web_whois
218-
}
219-
220-
resource "google_compute_global_forwarding_rule" "http_whois_ipv4_forwarding_rule" {
221-
name = "http-whois-ipv4-forwarding-rule${var.suffix}"
222-
ip_address = google_compute_global_address.proxy_ipv4_address.address
223-
target = google_compute_target_http_proxy.http_whois_http_proxy.self_link
224-
port_range = "80"
225-
count = var.public_web_whois
226-
}
227-
228-
resource "google_compute_global_forwarding_rule" "http_whois_ipv6_forwarding_rule" {
229-
name = "http-whois-ipv6-forwarding-rule${var.suffix}"
230-
ip_address = google_compute_global_address.proxy_ipv6_address.address
231-
target = google_compute_target_http_proxy.http_whois_http_proxy.self_link
232-
port_range = "80"
233-
count = var.public_web_whois
234-
}

proxy/terraform/modules/networking/variables.tf

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,3 @@ variable "proxy_domain" {
2020
variable "proxy_domain_name" {
2121
description = "Domain name of the zone."
2222
}
23-
24-
variable "public_web_whois" {
25-
type = number
26-
description = <<EOF
27-
Set to 1 if the whois HTTP ports are external, 0 if not. This is necessary
28-
because our test projects are configured with
29-
constraints/compute.restrictLoadBalancerCreationForTypes, which prohibits
30-
forwarding external HTTP(s) connections.
31-
EOF
32-
}

proxy/terraform/modules/variables.tf

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ variable "gcr_project_name" {
88

99
variable "proxy_domain_name" {
1010
description = <<EOF
11-
The base domain name of the proxy, without the whois. or epp. part.
11+
The base domain name of the proxy, without the epp. part.
1212
EOF
1313
}
1414

@@ -35,10 +35,7 @@ variable "proxy_ports" {
3535

3636
default = {
3737
health_check = 30000
38-
whois = 30001
3938
epp = 30002
40-
http-whois = 30010
41-
https-whois = 30011
4239
}
4340
}
4441

@@ -48,20 +45,6 @@ variable "proxy_ports_canary" {
4845

4946
default = {
5047
health_check = 31000
51-
whois = 31001
5248
epp = 31002
53-
http-whois = 31010
54-
https-whois = 31011
5549
}
5650
}
57-
58-
variable "public_web_whois" {
59-
type = number
60-
default = 1
61-
description = <<EOF
62-
Set to 1 if the whois HTTP ports are external, 0 if not. This is necessary
63-
because our test projects are configured with
64-
constraints/compute.restrictLoadBalancerCreationForTypes, which prohibits
65-
forwarding external HTTP(s) connections.
66-
EOF
67-
}

proxy/terraform/update_named_ports.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
# the project, zone and instance group names, and then call gcloud to add the
1919
# named ports.
2020

21-
PROD_PORTS="whois:30001,epp:30002,http-whois:30010,https-whois:30011"
22-
CANARY_PORTS="whois-canary:31001,epp-canary:31002,"\
23-
"http-whois-canary:31010,https-whois-canary:31011"
21+
PROD_PORTS="epp:30002"
22+
CANARY_PORTS="epp-canary:31002"
2423

2524
while read line
2625
do

0 commit comments

Comments
 (0)