diff --git a/deploy/aliyun/versions.tf b/deploy/aliyun/versions.tf index ac97c6ac8e..0019392113 100644 --- a/deploy/aliyun/versions.tf +++ b/deploy/aliyun/versions.tf @@ -1,4 +1,11 @@ terraform { required_version = ">= 0.12" + required_providers { + alicloud = "~> 1.56" + external = "~> 1.2" + helm = "~> 0.10" + null = "~> 2.1" + template = "~> 2.1" + } } diff --git a/deploy/gcp/main.tf b/deploy/gcp/main.tf index 8cbbc48926..e96b70be4a 100644 --- a/deploy/gcp/main.tf +++ b/deploy/gcp/main.tf @@ -50,7 +50,7 @@ module "tidb-operator" { kubeconfig_path = local.kubeconfig tidb_operator_version = var.tidb_operator_version maintenance_window_start_time = var.maintenance_window_start_time - operator_helm_values = var.operator_helm_values + operator_helm_values = var.operator_helm_values == "" ? var.operator_helm_values_file == "" ? "" : file(var.operator_helm_values_file) : var.operator_helm_values } module "bastion" { diff --git a/deploy/gcp/tidbclusters.tf b/deploy/gcp/tidbclusters.tf index fc919d6a31..8ff5efb8c3 100644 --- a/deploy/gcp/tidbclusters.tf +++ b/deploy/gcp/tidbclusters.tf @@ -40,5 +40,5 @@ module "default-tidb-cluster" { tidb_node_count = var.tidb_count monitor_node_count = var.monitor_count tikv_local_ssd_count = var.tikv_local_ssd_count - override_values = var.override_values + override_values = var.override_values == "" ? var.override_values_file == "" ? "" : file(var.override_values_file) : var.override_values } diff --git a/deploy/gcp/variables.tf b/deploy/gcp/variables.tf index 9b2c906933..e789993eaf 100644 --- a/deploy/gcp/variables.tf +++ b/deploy/gcp/variables.tf @@ -42,6 +42,11 @@ variable "operator_helm_values" { default = "" } +variable "operator_helm_values_file" { + description = "The helm values file for TiDB Operator, path is relative to current working dir" + default = "" +} + variable "create_vpc" { default = true } @@ -129,3 +134,7 @@ variable "override_values" { description = "YAML formatted values that will be passed in to the tidb-cluster helm release" default = "" } +variable "override_values_file" { + description = "The helm values file for TiDB Cluster, path is relative to current working dir" + default = "" +} diff --git a/deploy/gcp/versions.tf b/deploy/gcp/versions.tf index ac97c6ac8e..f7999a8e96 100644 --- a/deploy/gcp/versions.tf +++ b/deploy/gcp/versions.tf @@ -1,4 +1,11 @@ terraform { required_version = ">= 0.12" + required_providers { + google = "~> 2.16" + google-beta = "~> 2.16" + external = "~> 1.2" + helm = "~> 0.10" + null = "~> 2.1" + } }