mirror of
https://github.com/google/nomulus
synced 2026-08-18 21:26:16 +00:00
Update terraform files and instructions (#1402)
* Update terraform files and instructions
Update proxy terraform files based on current best practices and allow
exclusion of forwarding rules for HTTP endpoints. Specifically:
- Add a "public_web_whois" input to allow disabling the public HTTP
whois forwarding.
- Add "description" fields to all variables.
- Move outputs of the top-level module into "outputs.tf".
- Auto-reformat using hclfmt.
This commit is contained in:
@@ -206,6 +206,7 @@ resource "google_compute_global_forwarding_rule" "https_whois_ipv4_forwarding_ru
|
||||
ip_address = google_compute_global_address.proxy_ipv4_address.address
|
||||
target = google_compute_target_tcp_proxy.https_whois_tcp_proxy.self_link
|
||||
port_range = "443"
|
||||
count = var.public_web_whois
|
||||
}
|
||||
|
||||
resource "google_compute_global_forwarding_rule" "https_whois_ipv6_forwarding_rule" {
|
||||
@@ -213,6 +214,7 @@ resource "google_compute_global_forwarding_rule" "https_whois_ipv6_forwarding_ru
|
||||
ip_address = google_compute_global_address.proxy_ipv6_address.address
|
||||
target = google_compute_target_tcp_proxy.https_whois_tcp_proxy.self_link
|
||||
port_range = "443"
|
||||
count = var.public_web_whois
|
||||
}
|
||||
|
||||
resource "google_compute_global_forwarding_rule" "http_whois_ipv4_forwarding_rule" {
|
||||
@@ -220,6 +222,7 @@ resource "google_compute_global_forwarding_rule" "http_whois_ipv4_forwarding_rul
|
||||
ip_address = google_compute_global_address.proxy_ipv4_address.address
|
||||
target = google_compute_target_http_proxy.http_whois_http_proxy.self_link
|
||||
port_range = "80"
|
||||
count = var.public_web_whois
|
||||
}
|
||||
|
||||
resource "google_compute_global_forwarding_rule" "http_whois_ipv6_forwarding_rule" {
|
||||
@@ -227,4 +230,5 @@ resource "google_compute_global_forwarding_rule" "http_whois_ipv6_forwarding_rul
|
||||
ip_address = google_compute_global_address.proxy_ipv6_address.address
|
||||
target = google_compute_target_http_proxy.http_whois_http_proxy.self_link
|
||||
port_range = "80"
|
||||
count = var.public_web_whois
|
||||
}
|
||||
|
||||
@@ -1,20 +1,32 @@
|
||||
# Instance groups that the load balancer forwards traffic to.
|
||||
variable "proxy_instance_groups" {
|
||||
type = map
|
||||
type = map
|
||||
description = "Instance groups that the load balancer forwards traffic to."
|
||||
}
|
||||
|
||||
# Suffix (such as "-canary") added to the resource names.
|
||||
variable "suffix" {
|
||||
default = ""
|
||||
default = ""
|
||||
description = "Suffix (such as '-canary') added to the resource names."
|
||||
}
|
||||
|
||||
# Node ports exposed by the proxy.
|
||||
variable "proxy_ports" {
|
||||
type = map
|
||||
type = map
|
||||
description = "Node ports exposed by the proxy."
|
||||
}
|
||||
|
||||
# DNS zone for the proxy domain.
|
||||
variable "proxy_domain" {}
|
||||
variable "proxy_domain" {
|
||||
description = "DNS zone for the proxy domain."
|
||||
}
|
||||
|
||||
# domain name of the zone.
|
||||
variable "proxy_domain_name" {}
|
||||
variable "proxy_domain_name" {
|
||||
description = "Domain name of the zone."
|
||||
}
|
||||
|
||||
variable "public_web_whois" {
|
||||
type = number
|
||||
description = <<EOF
|
||||
Set to 1 if the whois HTTP ports are external, 0 if not. This is necessary
|
||||
because our test projects are configured with
|
||||
constraints/compute.restrictLoadBalancerCreationForTypes, which prohibits
|
||||
forwarding external HTTP(s) connections.
|
||||
EOF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user