Patch terraform changes made internally (#651)

There were several LSC that made some formatting changes to our .tf
files. Export these changes externally for consistency.
This commit is contained in:
Lai Jiang 2020-06-25 13:59:37 -04:00 committed by GitHub
parent 39e6b85837
commit b7b4658d0c
9 changed files with 34 additions and 30 deletions

View file

@ -1,4 +1,3 @@
provider "google" {
version = ">= 1.13.0"
project = var.proxy_project_name
}

View file

@ -17,7 +17,7 @@ module "proxy_gke_apac" {
}
locals {
"proxy_instance_groups" = {
proxy_instance_groups = {
americas = module.proxy_gke_americas.proxy_instance_group
emea = module.proxy_gke_emea.proxy_instance_group
apac = module.proxy_gke_apac.proxy_instance_group

View file

@ -1,10 +1,10 @@
locals {
proxy_cluster_zone = "${lookup(var.proxy_cluster_zones, var.proxy_cluster_region)}"
proxy_cluster_zone = lookup(var.proxy_cluster_zones, var.proxy_cluster_region)
}
resource "google_container_cluster" "proxy_cluster" {
name = "proxy-cluster-${var.proxy_cluster_region}"
zone = local.proxy_cluster_zone
name = "proxy-cluster-${var.proxy_cluster_region}"
location = local.proxy_cluster_zone
timeouts {
update = "30m"

View file

@ -1,3 +1,3 @@
output "proxy_instance_group" {
value = "${google_container_cluster.proxy_cluster.instance_group_urls[0]}"
value = google_container_cluster.proxy_cluster.instance_group_urls[0]
}

View file

@ -3,7 +3,7 @@ variable "proxy_service_account_email" {}
variable "proxy_cluster_region" {}
variable "proxy_cluster_zones" {
type = "map"
type = map
default = {
americas = "us-east4-a"

View file

@ -1,6 +1,11 @@
resource "google_dns_managed_zone" "proxy_domain" {
name = "proxy-domain"
dns_name = "${var.proxy_domain_name}."
# This is a safeguard for the google provider update to 2.8.0.
# cl/264641943
# If you like, you can remove this line after the update.
lifecycle { prevent_destroy = true }
}
module "proxy_networking" {

View file

@ -16,11 +16,11 @@ resource "google_compute_firewall" "proxy_firewall" {
protocol = "tcp"
ports = [
"${var.proxy_ports["epp"]}",
"${var.proxy_ports["whois"]}",
"${var.proxy_ports["health_check"]}",
"${var.proxy_ports["http-whois"]}",
"${var.proxy_ports["https-whois"]}",
var.proxy_ports["epp"],
var.proxy_ports["whois"],
var.proxy_ports["health_check"],
var.proxy_ports["http-whois"],
var.proxy_ports["https-whois"],
]
}
@ -38,7 +38,7 @@ resource "google_compute_health_check" "proxy_health_check" {
name = "proxy-health-check${var.suffix}"
tcp_health_check {
port = "${var.proxy_ports["health_check"]}"
port = var.proxy_ports["health_check"]
request = "HEALTH_CHECK_REQUEST"
response = "HEALTH_CHECK_RESPONSE"
}
@ -49,7 +49,7 @@ resource "google_compute_health_check" "proxy_http_health_check" {
http_health_check {
host = "health-check.invalid"
port = "${var.proxy_ports["http-whois"]}"
port = var.proxy_ports["http-whois"]
request_path = "/"
}
}
@ -66,15 +66,15 @@ resource "google_compute_backend_service" "epp_backend_service" {
port_name = "epp${var.suffix}"
backend {
group = "${var.proxy_instance_groups["americas"]}"
group = var.proxy_instance_groups["americas"]
}
backend {
group = "${var.proxy_instance_groups["emea"]}"
group = var.proxy_instance_groups["emea"]
}
backend {
group = "${var.proxy_instance_groups["apac"]}"
group = var.proxy_instance_groups["apac"]
}
health_checks = [
@ -89,15 +89,15 @@ resource "google_compute_backend_service" "whois_backend_service" {
port_name = "whois${var.suffix}"
backend {
group = "${var.proxy_instance_groups["americas"]}"
group = var.proxy_instance_groups["americas"]
}
backend {
group = "${var.proxy_instance_groups["emea"]}"
group = var.proxy_instance_groups["emea"]
}
backend {
group = "${var.proxy_instance_groups["apac"]}"
group = var.proxy_instance_groups["apac"]
}
health_checks = [
@ -112,15 +112,15 @@ resource "google_compute_backend_service" "https_whois_backend_service" {
port_name = "https-whois${var.suffix}"
backend {
group = "${var.proxy_instance_groups["americas"]}"
group = var.proxy_instance_groups["americas"]
}
backend {
group = "${var.proxy_instance_groups["emea"]}"
group = var.proxy_instance_groups["emea"]
}
backend {
group = "${var.proxy_instance_groups["apac"]}"
group = var.proxy_instance_groups["apac"]
}
health_checks = [
@ -135,15 +135,15 @@ resource "google_compute_backend_service" "http_whois_backend_service" {
port_name = "http-whois${var.suffix}"
backend {
group = "${var.proxy_instance_groups["americas"]}"
group = var.proxy_instance_groups["americas"]
}
backend {
group = "${var.proxy_instance_groups["emea"]}"
group = var.proxy_instance_groups["emea"]
}
backend {
group = "${var.proxy_instance_groups["apac"]}"
group = var.proxy_instance_groups["apac"]
}
health_checks = [

View file

@ -1,6 +1,6 @@
# Instance groups that the load balancer forwards traffic to.
variable "proxy_instance_groups" {
type = "map"
type = map
}
# Suffix (such as "-canary") added to the resource names.
@ -10,7 +10,7 @@ variable "suffix" {
# Node ports exposed by the proxy.
variable "proxy_ports" {
type = "map"
type = map
}
# DNS zone for the proxy domain.

View file

@ -22,7 +22,7 @@ variable "proxy_key" {
# Node ports exposed by the proxy.
variable "proxy_ports" {
type = "map"
type = map
default = {
health_check = 30000
@ -35,7 +35,7 @@ variable "proxy_ports" {
# Node ports exposed by the canary proxy.
variable "proxy_ports_canary" {
type = "map"
type = map
default = {
health_check = 31000