From ec8129f06e1009beb4c261a362e805e81bbcc15c Mon Sep 17 00:00:00 2001 From: Yecheng Fu Date: Wed, 21 Aug 2019 21:39:07 +0800 Subject: [PATCH] using real node locations --- deploy/modules/gcp/tidb-cluster/data.tf | 11 ++++++++++- deploy/modules/gcp/tidb-cluster/main.tf | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/deploy/modules/gcp/tidb-cluster/data.tf b/deploy/modules/gcp/tidb-cluster/data.tf index c73e032c78..0efb7629ba 100644 --- a/deploy/modules/gcp/tidb-cluster/data.tf +++ b/deploy/modules/gcp/tidb-cluster/data.tf @@ -18,4 +18,13 @@ data "external" "monitor_port" { program = ["bash", "-c", "kubectl --kubeconfig ${var.kubeconfig_path} get svc -n ${var.cluster_name} ${var.cluster_name}-grafana -o json | jq '.spec.ports | .[] | select( .name == \"grafana\") | {port: .port|tostring}'"] } -data "google_compute_zones" "available" {} +locals { + # TODO Update related code when node locations is avaiable in attributes of cluster resource. + cmd_get_cluster_locations = <