-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathproxies.tf
69 lines (61 loc) · 1.98 KB
/
proxies.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# --------------------------
# -- Load Balancer
# --------------------------
resource "google_compute_region_network_endpoint_group" "proxies_neg" {
name = "proxies-neg"
network_endpoint_type = "SERVERLESS"
region = "us-east4"
cloud_function {
function = google_cloudfunctions_function.proxy.name
}
}
resource "google_compute_global_address" "proxies-lb-ip" {
name = "proxies-address"
ip_version = "IPV4"
address = "34.111.194.44"
}
module "proxies-lb-http" {
source = "GoogleCloudPlatform/lb-http/google//modules/serverless_negs"
version = "~> 9.0.0"
project = var.project_id
name = "proxies"
managed_ssl_certificate_domains = ["proxies.nine30.com"]
ssl = true
https_redirect = false
address = google_compute_global_address.proxies-lb-ip.address
create_address = false
http_forward = false
backends = {
default = {
groups = [
{
group = google_compute_region_network_endpoint_group.proxies_neg.id
}
]
protocol = "HTTP"
port_name = "http"
description = null
enable_cdn = false
custom_request_headers = null
custom_response_headers = null
security_policy = null
edge_security_policy = null
compression_mode = null
connection_draining_timeout_sec = null
session_affinity = null
affinity_cookie_ttl_sec = null
log_config = {
enable = true
sample_rate = 1.0
}
iap_config = {
enable = false
oauth2_client_id = null
oauth2_client_secret = null
}
description = null
custom_request_headers = null
security_policy = null
}
}
}