Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 68 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,76 @@ You can use this in your terraform template with the following steps.
|------|-------------|
| instance_ids | the IDs of Elasticsearch instance. |

## Notes
From the version v1.2.0, the module has removed the following `provider` setting:

```hcl
provider "alicloud" {
version = ">=1.56.0"
region = var.region != "" ? var.region : null
configuration_source = "terraform-alicloud-modules/elasticsearch-instance"
}
```

If you still want to use the `provider` setting to apply this module, you can specify a supported version, like 1.1.0:

```hcl
module "instance" {
source = "terraform-alicloud-modules/elasticsearch-instance/alicloud"
version = "1.1.0"
region = "cn-beijing"
password = "Your password"
data_node_amount = "2"
// ...
}
```

If you want to upgrade the module to 1.2.0 or higher in-place, you can define a provider which same region with
previous region:

```hcl
provider "alicloud" {
region = "cn-beijing"
}
module "instance" {
source = "terraform-alicloud-modules/elasticsearch-instance/alicloud"
password = "Your password"
data_node_amount = "2"
// ...
}
```
or specify an alias provider with a defined region to the module using `providers`:

```hcl
provider "alicloud" {
region = "cn-beijing"
alias = "bj"
}
module "instance" {
source = "terraform-alicloud-modules/elasticsearch-instance/alicloud"
providers = {
alicloud = alicloud.bj
}
password = "Your password"
data_node_amount = "2"
// ...
}
```

and then run `terraform init` and `terraform apply` to make the defined provider effect to the existing module state.

More details see [How to use provider in the module](https://www.terraform.io/docs/language/modules/develop/providers.html#passing-providers-explicitly)

## Terraform versions

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.12.0 |
| <a name="requirement_alicloud"></a> [alicloud](#requirement\_alicloud) | >= 1.56.0 |

Authors
-------
Created and maintained by Guangfan Qu(@guangfanqu guangfan.qu@gmail.com)
Created and maintained by Alibaba Cloud Terraform Team(terraform@alibabacloud.com)

Reference
---------
Expand Down
6 changes: 0 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
provider "alicloud" {
version = ">=1.56.0"
region = var.region != "" ? var.region : null
configuration_source = "terraform-alicloud-modules/elasticsearch-instance"
}

#########################
# Elasticsearch instance
#########################
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "region" {
description = "The region used to launch this module resources."
description = "(Deprecated from version 1.2.0) The region used to launch this module resources."
default = ""
}

Expand Down