diff --git a/deploy/modules/aliyun/tidb-operator/main.tf b/deploy/modules/aliyun/tidb-operator/main.tf index 0bc36fb3bb..69e1ff83ef 100644 --- a/deploy/modules/aliyun/tidb-operator/main.tf +++ b/deploy/modules/aliyun/tidb-operator/main.tf @@ -50,6 +50,9 @@ resource "alicloud_security_group_rule" "cluster_worker_ingress" { # Create a managed Kubernetes cluster resource "alicloud_cs_managed_kubernetes" "k8s" { name = var.cluster_name + // 'version' is a reserved parameter and it just is used to test. No Recommendation to expose it. + // https://github.com/terraform-providers/terraform-provider-alicloud/blob/master/alicloud/resource_alicloud_cs_kubernetes.go#L396-L401 + version = var.k8s_version // split and join: workaround for terraform's limitation of conditional list choice, similarly hereinafter vswitch_ids = [ diff --git a/deploy/modules/aliyun/tidb-operator/variables.tf b/deploy/modules/aliyun/tidb-operator/variables.tf index 4d659c3435..92a1532ef8 100644 --- a/deploy/modules/aliyun/tidb-operator/variables.tf +++ b/deploy/modules/aliyun/tidb-operator/variables.tf @@ -15,6 +15,12 @@ variable "cluster_name" { default = "my-cluster" } +variable "k8s_version" { + description = "Kubernetes cluster version" + default = "1.14.8-aliyun.1" + type = string +} + variable "cluster_network_type" { description = "Kubernetes network plugin, options: [flannel, terway]. Cannot change once created." default = "flannel"