Format terraform files

For some reason the auto-formatting didn't happen when these files are first checked in.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191589487
This commit is contained in:
jianglai 2018-04-04 07:36:05 -07:00 committed by Ben McIlwain
parent e7f033201b
commit 4c06b36118
9 changed files with 105 additions and 87 deletions

View file

@ -28,8 +28,7 @@ output "proxy_instance_groups" {
output "proxy_ip_addresses" {
value = {
ipv4 = "${module.proxy.proxy_ipv4_address}",
ipv4 = "${module.proxy.proxy_ipv4_address}"
ipv6 = "${module.proxy.proxy_ipv6_address}"
}
}

View file

@ -21,9 +21,9 @@ module "proxy_gke_apac" {
locals {
"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}",
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

@ -15,23 +15,28 @@ resource "google_container_cluster" "proxy_cluster" {
node_pool {
name = "proxy-node-pool"
initial_node_count = 1
node_config {
tags = [
"proxy-cluster"]
"proxy-cluster",
]
service_account = "${var.proxy_service_account_email}"
oauth_scopes = [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/userinfo.email"
"https://www.googleapis.com/auth/userinfo.email",
]
}
autoscaling {
max_node_count = 5
min_node_count = 1
}
management {
auto_repair = true
auto_upgrade = true
}
}
}

View file

@ -4,6 +4,7 @@ variable "proxy_cluster_region" {}
variable "proxy_cluster_zones" {
type = "map"
default = {
americas = "us-east4-a"
emea = "europe-west4-b"

View file

@ -23,6 +23,7 @@ variable "proxy_key" {
# Node ports exposed by the proxy.
variable "proxy_ports" {
type = "map"
default = {
health_check = 30000
whois = 30001

View file

@ -13,4 +13,3 @@ resource "google_kms_crypto_key_iam_member" "ssl_key_decrypter" {
role = "roles/cloudkms.cryptoKeyDecrypter"
member = "serviceAccount:${google_service_account.proxy_service_account.email}"
}

View file

@ -14,18 +14,21 @@ resource "google_compute_firewall" "proxy_firewall" {
allow {
protocol = "tcp"
ports = [
"${var.proxy_ports["epp"]}",
"${var.proxy_ports["whois"]}",
"${var.proxy_ports["health_check"]}"]
"${var.proxy_ports["health_check"]}",
]
}
source_ranges = [
"130.211.0.0/22",
"35.191.0.0/16"]
"35.191.0.0/16",
]
target_tags = [
"proxy-cluster"
"proxy-cluster",
]
}
@ -44,17 +47,22 @@ resource "google_compute_backend_service" "epp_backend_service" {
protocol = "TCP"
timeout_sec = 3600
port_name = "epp"
backend {
group = "${local.proxy_instance_groups["americas"]}"
}
backend {
group = "${local.proxy_instance_groups["emea"]}"
}
backend {
group = "${local.proxy_instance_groups["apac"]}"
}
health_checks = [
"${google_compute_health_check.proxy_health_check.self_link}"]
"${google_compute_health_check.proxy_health_check.self_link}",
]
}
resource "google_compute_backend_service" "whois_backend_service" {
@ -62,17 +70,22 @@ resource "google_compute_backend_service" "whois_backend_service" {
protocol = "TCP"
timeout_sec = 60
port_name = "whois"
backend {
group = "${local.proxy_instance_groups["americas"]}"
}
backend {
group = "${local.proxy_instance_groups["emea"]}"
}
backend {
group = "${local.proxy_instance_groups["apac"]}"
}
health_checks = [
"${google_compute_health_check.proxy_health_check.self_link}"]
"${google_compute_health_check.proxy_health_check.self_link}",
]
}
resource "google_compute_target_tcp_proxy" "epp_tcp_proxy" {