diff --git a/deploy/gcp/README.md b/deploy/gcp/README.md index c05486a1f8..0715ea95af 100644 --- a/deploy/gcp/README.md +++ b/deploy/gcp/README.md @@ -26,11 +26,11 @@ The default setup will create a new VPC, two subnetworks, and an f1-micro instan The terraform script expects three environment variables. You can let Terraform prompt you for them, or `export` them ahead of time. If you choose to export them, they are: -* `TF_VAR_GCP_CREDENTIALS_PATH`: Path to a valid GCP credentials file +* `TF_VAR_GCP_CREDENTIALS_PATH`: Path to a valid GCP credentials file. It is generally considered a good idea to create a service account to be used by Terraform. See [this page](https://cloud.google.com/iam/docs/creating-managing-service-accounts) for more information on how to manage them. See [this page](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) for creating and managing service account keys which, when downloaded, will be the needed credentials file. * `TF_VAR_GCP_REGION`: The region to create the resources in, for example: `us-west1` * `TF_VAR_GCP_PROJECT`: The name of the GCP project -It is generally considered a good idea to create a service account to be used by Terraform. See https://cloud.google.com/iam/docs/creating-managing-service-accounts for more information on how to manage them. + The service account should have sufficient permissions to create resources in the project. The `Project Editor` primitive will accomplish this. diff --git a/deploy/gcp/main.tf b/deploy/gcp/main.tf index 6d02925662..a10aeeb5a9 100644 --- a/deploy/gcp/main.tf +++ b/deploy/gcp/main.tf @@ -316,6 +316,10 @@ EOS resource "null_resource" "deploy-tidb-cluster" { depends_on = ["null_resource.setup-env", "local_file.tidb-cluster-values", "google_container_node_pool.pd_pool", "google_container_node_pool.tikv_pool", "google_container_node_pool.tidb_pool"] + triggers { + values = "${data.template_file.tidb_cluster_values.rendered}" + } + provisioner "local-exec" { command = <