-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
179 lines (157 loc) · 5.59 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
//Autoscaling group
variable "region" {
description = "(Deprecated from version 1.5.0)The region ID used to launch this module resources. If not set, it will be sourced from followed by ALICLOUD_REGION environment variable and profile."
type = string
default = ""
}
variable "profile" {
description = "(Deprecated from version 1.5.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable."
type = string
default = ""
}
variable "shared_credentials_file" {
description = "(Deprecated from version 1.5.0)This is the path to the shared credentials file. If this is not set and a profile is specified, $HOME/.aliyun/config.json will be used."
type = string
default = ""
}
variable "skip_region_validation" {
description = "(Deprecated from version 1.5.0)Skip static validation of region ID. Used by users of alternative AlibabaCloud-like APIs or users w/ access to regions that are not public (yet)."
type = bool
default = false
}
# VPC variables
variable "new_vpc" {
description = "Create a new vpc for this module."
type = bool
default = false
}
variable "vpc_cidr" {
description = "The cidr block used to launch a new vpc."
type = string
default = "192.168.0.0/16"
}
# VSwitch variables
variable "vswitch_ids" {
description = "List Ids of existing vswitch."
type = list(string)
default = []
}
variable "vswitch_cidrs" {
description = "List cidr blocks used to create several new vswitches when 'new_vpc' is true."
type = list(string)
default = ["192.168.1.0/24"]
}
variable "availability_zones" {
description = "List available zone ids used to create several new vswitches when 'vswitch_ids' is not specified. If not set, data source `alicloud_zones` will return one automatically."
type = list(string)
default = []
}
variable "new_eip_bandwidth" {
description = "The bandwidth used to create a new EIP when 'new_vpc' is true."
type = number
default = 50
}
variable "new_nat_gateway" {
description = "Seting it to true can create a new nat gateway automatically in a existing VPC. If 'new_vpc' is true, it will be ignored."
type = bool
default = false
}
# Cluster nodes variables
variable "cpu_core_count" {
description = "CPU core count is used to fetch instance types."
type = number
default = 1
}
variable "memory_size" {
description = "Memory size used to fetch instance types."
type = number
default = 2
}
variable "kubernetes_version" {
description = "Desired Kubernetes version"
type = string
default = ""
}
variable "worker_instance_types" {
description = "The ecs instance type used to launch worker nodes. If not set, data source `alicloud_instance_types` will return one based on `cpu_core_count` and `memory_size`."
type = list(string)
default = ["ecs.n4.xlarge"]
}
variable "cluster_addons" {
description = "Addon components in kubernetes cluster"
type = list(object({
name = string
config = string
}))
default = []
}
variable "worker_disk_category" {
description = "The system disk category used to launch one or more worker nodes."
type = string
default = "cloud_efficiency"
}
variable "worker_disk_size" {
description = "The system disk size used to launch one or more worker nodes."
type = number
default = 40
}
variable "ecs_password" {
description = "The password of worker nodes."
type = string
default = "Abc12345"
}
variable "worker_number" {
description = "The number of kubernetes cluster work nodes."
type = number
default = 2
}
variable "k8s_name_prefix" {
description = "The name prefix used to create managed kubernetes cluster."
type = string
default = "terraform-alicloud-managed-kubernetes"
}
variable "k8s_pod_cidr" {
description = "The kubernetes pod cidr block. It cannot be equals to vpc's or vswitch's and cannot be in them. If vpc's cidr block is `172.16.XX.XX/XX`, it had better to `192.168.XX.XX/XX` or `10.XX.XX.XX/XX`."
type = string
default = "172.20.0.0/16"
}
variable "k8s_service_cidr" {
description = "The kubernetes service cidr block. It cannot be equals to vpc's or vswitch's or pod's and cannot be in them. Its setting rule is same as `k8s_pod_cidr`."
type = string
default = "172.21.0.0/20"
}
variable "cluster_network_type" {
description = "(Deprecated from v1.3.0, use 'cluster_addons' instead)Network type, valid options are `flannel` and `terway`."
type = string
default = "flannel"
}
variable "new_sls_project" {
description = "(Deprecated from v1.3.0, use 'cluster_addons' instead)Create a new sls project for this module."
type = bool
default = false
}
variable "sls_project_name" {
description = "(Deprecated from v1.3.0, use 'cluster_addons' instead)Specify a existing sls project for this module."
type = string
default = ""
}
variable "kube_config_path" {
description = "The path of kube config, like ~/.kube/config"
type = string
default = ""
}
variable "client_cert_path" {
description = "The path of client certificate, like ~/.kube/client-cert.pem"
type = string
default = ""
}
variable "client_key_path" {
description = "The path of client key, like ~/.kube/client-key.pem"
type = string
default = ""
}
variable "cluster_ca_cert_path" {
description = "The path of cluster ca certificate, like ~/.kube/cluster-ca-cert.pem"
type = string
default = ""
}