@@ -12,10 +12,6 @@ These types of the module resource are supported:
12
12
- [ Nat Gateway] ( https://www.terraform.io/docs/providers/alicloud/r/nat_gateway.html )
13
13
- [ Kubernetes] ( https://www.terraform.io/docs/providers/alicloud/r/cs_kubernetes.html )
14
14
15
- Terraform version
16
- -----------------
17
- The Module requires Terraform 0.12 and Terraform Provider AliCloud 1.75.0+.
18
-
19
15
Usage
20
16
-----
21
17
This example can specify the following arguments to create user-defined kuberntes cluster
@@ -76,7 +72,6 @@ data "alicloud_vpcs" "default" {
76
72
77
73
module "k8s" {
78
74
source = "../"
79
- region = var.region
80
75
81
76
new_nat_gateway = true
82
77
vpc_name = "tf-k8s-vpc"
@@ -113,7 +108,6 @@ data "alicloud_vpcs" "default" {
113
108
114
109
module "k8s" {
115
110
source = "../"
116
- region = var.region
117
111
118
112
vpc_id = data.alicloud_vpcs.default.vpcs.0.id
119
113
vswitch_ids = ["vsw-bp1pog8voc3f42arr****", "vsw-bp1jxetj1386gqssg****", "vsw-bp1s1835sq5tjss9s****"]
@@ -149,7 +143,6 @@ data "alicloud_vpcs" "default" {
149
143
150
144
module "k8s" {
151
145
source = "../"
152
- region = var.region
153
146
154
147
new_nat_gateway = false
155
148
vpc_id = data.alicloud_vpcs.default.vpcs.0.id
@@ -166,6 +159,78 @@ module "k8s" {
166
159
167
160
* [ complete example] ( https://github.com/terraform-alicloud-modules/terraform-alicloud-kubernetes/tree/master/examples/complete )
168
161
162
+ ## Notes
163
+ From the version v1.4.0, the module has removed the following ` provider ` setting:
164
+
165
+ ``` hcl
166
+ provider "alicloud" {
167
+ profile = var.profile != "" ? var.profile : null
168
+ shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null
169
+ region = var.region
170
+ skip_region_validation = var.skip_region_validation
171
+ configuration_source = "terraform-alicloud-modules/kubernetes"
172
+ }
173
+ ```
174
+
175
+ If you still want to use the ` provider ` setting to apply this module, you can specify a supported version, like 1.3.0:
176
+
177
+ ``` hcl
178
+ module "k8s" {
179
+ source = "terraform-alicloud-modules/kubernetes/alicloud"
180
+ version = "1.3.0"
181
+ region = "cn-hangzhou"
182
+ profile = "Your-Profile-Name"
183
+ create_vpc = true
184
+ vpc_name = "my-env-vpc"
185
+ // ...
186
+ }
187
+ ```
188
+
189
+ If you want to upgrade the module to 1.4.0 or higher in-place, you can define a provider which same region with
190
+ previous region:
191
+
192
+ ``` hcl
193
+ provider "alicloud" {
194
+ region = "cn-hangzhou"
195
+ profile = "Your-Profile-Name"
196
+ }
197
+ module "infrastructure" {
198
+ source = "terraform-alicloud-modules/multi-zone-infrastructure-with-ots/alicloud"
199
+ create_vpc = true
200
+ vpc_name = "my-env-vpc"
201
+ // ...
202
+ }
203
+ ```
204
+ or specify an alias provider with a defined region to the module using ` providers ` :
205
+
206
+ ``` hcl
207
+ provider "alicloud" {
208
+ region = "cn-hangzhou"
209
+ profile = "Your-Profile-Name"
210
+ alias = "hz"
211
+ }
212
+ module "infrastructure" {
213
+ source = "terraform-alicloud-modules/multi-zone-infrastructure-with-ots/alicloud"
214
+ providers = {
215
+ alicloud = alicloud.hz
216
+ }
217
+ create_vpc = true
218
+ vpc_name = "my-env-vpc"
219
+ // ...
220
+ }
221
+ ```
222
+
223
+ and then run ` terraform init ` and ` terraform apply ` to make the defined provider effect to the existing module state.
224
+
225
+ More details see [ How to use provider in the module] ( https://www.terraform.io/docs/language/modules/develop/providers.html#passing-providers-explicitly )
226
+
227
+ ## Terraform versions
228
+
229
+ | Name | Version |
230
+ | ------| ---------|
231
+ | <a name =" requirement_terraform " ></a > [ terraform] ( #requirement\_ terraform ) | >= 0.12.0 |
232
+ | <a name =" requirement_alicloud " ></a > [ alicloud] ( #requirement\_ alicloud ) | >= 1.75.0 |
233
+
169
234
Submit Issues
170
235
-------------
171
236
If you have any problems when using this module, please opening a [ provider issue] ( https://github.com/terraform-providers/terraform-provider-alicloud/issues/new ) and let us know.
@@ -174,7 +239,7 @@ If you have any problems when using this module, please opening a [provider issu
174
239
175
240
Authors
176
241
-------
177
- Created and maintained by He Guimin( @ xiaozhu36 , heguimin36@163 .com )
242
+ Created and maintained by Alibaba Cloud Terraform Team( terraform@alibabacloud .com )
178
243
179
244
License
180
245
-------
0 commit comments