diff --git a/README-CN.md b/README-CN.md index aaa92a2..40025e8 100644 --- a/README-CN.md +++ b/README-CN.md @@ -14,7 +14,10 @@ terraform-alicloud-redis ## Terraform 版本 -本模板要求使用版本 Terraform 0.12 和阿里云 Provider 1.56.0+。 +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 0.12.0 | +| [alicloud](#requirement\_alicloud) | >= 1.56.0 ## 用法 @@ -23,7 +26,6 @@ terraform-alicloud-redis ```hcl module "redis" { source = "terraform-alicloud-modules/redis/alicloud" - region = "cn-beijing" ################# # Redis Instance ################# @@ -85,7 +87,6 @@ module "redis" { ```hcl module "redis" { source = "terraform-alicloud-modules/redis/alicloud" - region = "cn-beijing" ################# # Redis Instance ################# @@ -152,12 +153,73 @@ module "redis" { 更多模板详见 [Modules](https://github.com/terraform-alicloud-modules/terraform-alicloud-redis/tree/master/modules). ## 注意事项 +本Module从版本v1.3.0开始已经移除掉如下的 provider 的显示设置: +```hcl +provider "alicloud" { + profile = var.profile != "" ? var.profile : null + shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null + region = var.region != "" ? var.region : null + skip_region_validation = var.skip_region_validation + configuration_source = "terraform-alicloud-modules/redis" +} +``` + +如果你依然想在Module中使用这个 provider 配置,你可以在调用Module的时候,指定一个特定的版本,比如 1.2.0: + +```hcl +module "redis" { + source = "terraform-alicloud-modules/redis/alicloud" + version = "1.2.0" + region = "cn-hangzhou" + profile = "Your-Profile-Name" + + alarm_rule_name = "CmsAlarmForRedis" + alarm_rule_statistics = "Average" + alarm_rule_period = 300 + alarm_rule_operator = "<=" +} +``` +如果你想对正在使用中的Module升级到 1.3.0 或者更高的版本,那么你可以在模板中显示定义一个相同Region的provider: +```hcl +provider "alicloud" { + region = "cn-hangzhou" + profile = "Your-Profile-Name" +} +module "redis" { + source = "terraform-alicloud-modules/redis/alicloud" + alarm_rule_name = "CmsAlarmForRedis" + alarm_rule_statistics = "Average" + alarm_rule_period = 300 + alarm_rule_operator = "<=" +} +``` +或者,如果你是多Region部署,你可以利用 `alias` 定义多个 provider,并在Module中显示指定这个provider: + +```hcl +provider "alicloud" { + region = "cn-hangzhou" + profile = "Your-Profile-Name" + alias = "hz" +} +module "redis" { + source = "terraform-alicloud-modules/redis/alicloud" + providers = { + alicloud = alicloud.hz + } + alarm_rule_name = "CmsAlarmForRedis" + alarm_rule_statistics = "Average" + alarm_rule_period = 300 + alarm_rule_operator = "<=" +} +``` + +定义完provider之后,运行命令 `terraform init` 和 `terraform apply` 来让这个provider生效即可。 -* 本 Module 使用的 AccessKey 和 SecretKey 可以直接从 `profile` 和 `shared_credentials_file` 中获取。如果未设置,可通过下载安装 [aliyun-cli](https://github.com/aliyun/aliyun-cli#installation) 后进行配置。 +更多provider的使用细节,请移步[How to use provider in the module](https://www.terraform.io/docs/language/modules/develop/providers.html#passing-providers-explicitly) 作者 ------- -Created and maintained by Yi Jincheng(yi785301535@163.com), He Guimin(@xiaozhu36, heguimin36@163.com) +Created and maintained by Alibaba Cloud Terraform Team(terraform@alibabacloud.com) 许可 ---- diff --git a/README.md b/README.md index 380dc01..44b72d4 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,10 @@ These types of resources are supported: ## Terraform versions -This module requires Terraform 0.12 and Terraform Provider Alicloud 1.56.0+. +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 0.12.0 | +| [alicloud](#requirement\_alicloud) | >= 1.56.0 Usage ----- @@ -26,7 +29,6 @@ Be careful:Create Account supports redis instances of version 4.0 or above. ```hcl module "redis" { source = "terraform-alicloud-modules/redis/alicloud" - region = "cn-beijing" ################# # Redis Instance ################# @@ -89,7 +91,6 @@ Be careful:Create Account supports redis instances of version 4.0 or above. ```hcl module "redis" { source = "terraform-alicloud-modules/redis/alicloud" - region = "cn-beijing" ################# # Redis Instance ################# @@ -156,14 +157,76 @@ This module provides rich sub-modules to support different Redis version and usa See [more modules](https://github.com/terraform-alicloud-modules/terraform-alicloud-redis/tree/master/modules). ## Notes +From the version v1.3.0, the module has removed the following `provider` setting: -* This module using AccessKey and SecretKey are from `profile` and `shared_credentials_file`. -If you have not set them yet, please install [aliyun-cli](https://github.com/aliyun/aliyun-cli#installation) and configure it. +```hcl +provider "alicloud" { + profile = var.profile != "" ? var.profile : null + shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null + region = var.region != "" ? var.region : null + skip_region_validation = var.skip_region_validation + configuration_source = "terraform-alicloud-modules/redis" +} +``` + +If you still want to use the `provider` setting to apply this module, you can specify a supported version, like 1.2.0: + +```hcl +module "redis" { + source = "terraform-alicloud-modules/redis/alicloud" + version = "1.2.0" + region = "cn-hangzhou" + profile = "Your-Profile-Name" + + alarm_rule_name = "CmsAlarmForRedis" + alarm_rule_statistics = "Average" + alarm_rule_period = 300 + alarm_rule_operator = "<=" +} +``` + +If you want to upgrade the module to 1.3.0 or higher in-place, you can define a provider which same region with +previous region: + +```hcl +provider "alicloud" { + region = "cn-hangzhou" + profile = "Your-Profile-Name" +} +module "redis" { + source = "terraform-alicloud-modules/redis/alicloud" + alarm_rule_name = "CmsAlarmForRedis" + alarm_rule_statistics = "Average" + alarm_rule_period = 300 + alarm_rule_operator = "<=" +} +``` +or specify an alias provider with a defined region to the module using `providers`: + +```hcl +provider "alicloud" { + region = "cn-hangzhou" + profile = "Your-Profile-Name" + alias = "hz" +} +module "redis" { + source = "terraform-alicloud-modules/redis/alicloud" + providers = { + alicloud = alicloud.hz + } + alarm_rule_name = "CmsAlarmForRedis" + alarm_rule_statistics = "Average" + alarm_rule_period = 300 + alarm_rule_operator = "<=" +} +``` +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) Authors --------- -Created and maintained by Yi Jincheng(yi785301535@163.com), He Guimin(@xiaozhu36, heguimin36@163.com) +Created and maintained by Alibaba Cloud Terraform Team(terraform@alibabacloud.com) License ---- diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 30f8a36..6ff96f7 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -13,23 +13,39 @@ locals { data "alicloud_vpcs" "default" { is_default = true } + +data "alicloud_vswitches" "default" { + zone_id = data.alicloud_zones.default.zones.0.multi_zone_ids.0 + vpc_id = length(data.alicloud_vpcs.default.ids) > 0 ? "${data.alicloud_vpcs.default.ids.0}" : alicloud_vpc.default.0.id +} + +resource "alicloud_vpc" "default" { + count = length(data.alicloud_vpcs.default.ids) > 0 ? 0 : 1 + cidr_block = "172.16.0.0/12" + vpc_name = "test_vpc_007" +} + data "alicloud_zones" "default" { available_resource_creation = "KVStore" multi = true enable_details = true } + data "alicloud_kvstore_instance_classes" "default" { zone_id = data.alicloud_zones.default.zones.0.multi_zone_ids.0 engine = local.engine engine_version = local.engine_version architecture = local.architecture } + resource "alicloud_vswitch" "this" { - name = "redis_vpc" - availability_zone = data.alicloud_zones.default.zones.0.multi_zone_ids.0 - vpc_id = data.alicloud_vpcs.default.vpcs.0.id - cidr_block = cidrsubnet(data.alicloud_vpcs.default.vpcs.0.cidr_block, 4, 10) + count = length(data.alicloud_vswitches.default.ids) > 0 ? 0 : 1 + vswitch_name = "redis_vpc_007" + zone_id = data.alicloud_zones.default.zones.0.multi_zone_ids.0 + vpc_id = length(data.alicloud_vpcs.default.ids) > 0 ? data.alicloud_vpcs.default.vpcs.0.id : alicloud_vpc.default.0.id + cidr_block = "172.16.0.0/24" } + module "redis_example" { source = "../../" region = var.region @@ -44,7 +60,7 @@ module "redis_example" { password = "Yourpwd123456" period = 1 availability_zone = data.alicloud_zones.default.zones.0.multi_zone_ids.0 - vswitch_id = alicloud_vswitch.this.id + vswitch_id = length(data.alicloud_vswitches.default.ids) > 0 ? data.alicloud_vswitches.default.ids.0 : alicloud_vswitch.this.0.id security_ips = ["1.1.1.1", "2.2.2.2", "3.3.3.3"] tags = { Env = "Private" diff --git a/main.tf b/main.tf index 6a70fa3..ee0e818 100644 --- a/main.tf +++ b/main.tf @@ -1,11 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} - locals { this_instance_id = var.existing_instance_id != "" ? var.existing_instance_id : concat(alicloud_kvstore_instance.this.*.id, [""])[0] create_more_resources = var.existing_instance_id != "" || var.create_instance ? true : false diff --git a/modules/account/main.tf b/modules/account/main.tf index 2ac99a0..eba8321 100644 --- a/modules/account/main.tf +++ b/modules/account/main.tf @@ -1,11 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} - resource "alicloud_kvstore_account" "this" { count = var.create_account ? length(var.accounts) : 0 instance_id = var.redis_instance_id diff --git a/modules/account/variables.tf b/modules/account/variables.tf index 8f36f08..ba4d1c0 100644 --- a/modules/account/variables.tf +++ b/modules/account/variables.tf @@ -3,23 +3,23 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } diff --git a/modules/redis-2.8-communtity-cluster/main.tf b/modules/redis-2.8-communtity-cluster/main.tf index 343f6e8..17d9f43 100644 --- a/modules/redis-2.8-communtity-cluster/main.tf +++ b/modules/redis-2.8-communtity-cluster/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "2.8" diff --git a/modules/redis-2.8-communtity-cluster/variables.tf b/modules/redis-2.8-communtity-cluster/variables.tf index 83a2614..a69a04c 100644 --- a/modules/redis-2.8-communtity-cluster/variables.tf +++ b/modules/redis-2.8-communtity-cluster/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-2.8-communtity-rwsplit/main.tf b/modules/redis-2.8-communtity-rwsplit/main.tf index 2afedc6..dc0cc80 100644 --- a/modules/redis-2.8-communtity-rwsplit/main.tf +++ b/modules/redis-2.8-communtity-rwsplit/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "2.8" diff --git a/modules/redis-2.8-communtity-rwsplit/variables.tf b/modules/redis-2.8-communtity-rwsplit/variables.tf index 83a2614..a69a04c 100644 --- a/modules/redis-2.8-communtity-rwsplit/variables.tf +++ b/modules/redis-2.8-communtity-rwsplit/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-2.8-communtity-standard/main.tf b/modules/redis-2.8-communtity-standard/main.tf index 98d7f23..f64df97 100644 --- a/modules/redis-2.8-communtity-standard/main.tf +++ b/modules/redis-2.8-communtity-standard/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "2.8" diff --git a/modules/redis-2.8-communtity-standard/variables.tf b/modules/redis-2.8-communtity-standard/variables.tf index 83a2614..a69a04c 100644 --- a/modules/redis-2.8-communtity-standard/variables.tf +++ b/modules/redis-2.8-communtity-standard/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-4.0-communtity-cluster/main.tf b/modules/redis-4.0-communtity-cluster/main.tf index 017a466..db36b31 100644 --- a/modules/redis-4.0-communtity-cluster/main.tf +++ b/modules/redis-4.0-communtity-cluster/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "4.0" diff --git a/modules/redis-4.0-communtity-cluster/variables.tf b/modules/redis-4.0-communtity-cluster/variables.tf index a2b4e7a..feef307 100644 --- a/modules/redis-4.0-communtity-cluster/variables.tf +++ b/modules/redis-4.0-communtity-cluster/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-4.0-communtity-rwsplit/main.tf b/modules/redis-4.0-communtity-rwsplit/main.tf index 88899ee..853fad9 100644 --- a/modules/redis-4.0-communtity-rwsplit/main.tf +++ b/modules/redis-4.0-communtity-rwsplit/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "4.0" diff --git a/modules/redis-4.0-communtity-rwsplit/variables.tf b/modules/redis-4.0-communtity-rwsplit/variables.tf index a2b4e7a..feef307 100644 --- a/modules/redis-4.0-communtity-rwsplit/variables.tf +++ b/modules/redis-4.0-communtity-rwsplit/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-4.0-communtity-standard/main.tf b/modules/redis-4.0-communtity-standard/main.tf index 94b8134..613bd5b 100644 --- a/modules/redis-4.0-communtity-standard/main.tf +++ b/modules/redis-4.0-communtity-standard/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "4.0" diff --git a/modules/redis-4.0-communtity-standard/variables.tf b/modules/redis-4.0-communtity-standard/variables.tf index a2b4e7a..feef307 100644 --- a/modules/redis-4.0-communtity-standard/variables.tf +++ b/modules/redis-4.0-communtity-standard/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-4.0-enterprise-cluster-hybrid-storage/main.tf b/modules/redis-4.0-enterprise-cluster-hybrid-storage/main.tf index f40f4ca..17482f3 100644 --- a/modules/redis-4.0-enterprise-cluster-hybrid-storage/main.tf +++ b/modules/redis-4.0-enterprise-cluster-hybrid-storage/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "4.0" diff --git a/modules/redis-4.0-enterprise-cluster-hybrid-storage/variables.tf b/modules/redis-4.0-enterprise-cluster-hybrid-storage/variables.tf index a2b4e7a..feef307 100644 --- a/modules/redis-4.0-enterprise-cluster-hybrid-storage/variables.tf +++ b/modules/redis-4.0-enterprise-cluster-hybrid-storage/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-4.0-enterprise-standard-hybrid-storage/main.tf b/modules/redis-4.0-enterprise-standard-hybrid-storage/main.tf index 4f6a324..d38cdf0 100644 --- a/modules/redis-4.0-enterprise-standard-hybrid-storage/main.tf +++ b/modules/redis-4.0-enterprise-standard-hybrid-storage/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "4.0" diff --git a/modules/redis-4.0-enterprise-standard-hybrid-storage/variables.tf b/modules/redis-4.0-enterprise-standard-hybrid-storage/variables.tf index a2b4e7a..feef307 100644 --- a/modules/redis-4.0-enterprise-standard-hybrid-storage/variables.tf +++ b/modules/redis-4.0-enterprise-standard-hybrid-storage/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-5.0-communtity-cluster/main.tf b/modules/redis-5.0-communtity-cluster/main.tf index c8dbc45..67a704b 100644 --- a/modules/redis-5.0-communtity-cluster/main.tf +++ b/modules/redis-5.0-communtity-cluster/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "5.0" diff --git a/modules/redis-5.0-communtity-cluster/variables.tf b/modules/redis-5.0-communtity-cluster/variables.tf index a2b4e7a..feef307 100644 --- a/modules/redis-5.0-communtity-cluster/variables.tf +++ b/modules/redis-5.0-communtity-cluster/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-5.0-communtity-rwsplit/main.tf b/modules/redis-5.0-communtity-rwsplit/main.tf index 7b44110..8012783 100644 --- a/modules/redis-5.0-communtity-rwsplit/main.tf +++ b/modules/redis-5.0-communtity-rwsplit/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "5.0" diff --git a/modules/redis-5.0-communtity-rwsplit/variables.tf b/modules/redis-5.0-communtity-rwsplit/variables.tf index a2b4e7a..feef307 100644 --- a/modules/redis-5.0-communtity-rwsplit/variables.tf +++ b/modules/redis-5.0-communtity-rwsplit/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-5.0-communtity-standard/main.tf b/modules/redis-5.0-communtity-standard/main.tf index 08160cf..bacba98 100644 --- a/modules/redis-5.0-communtity-standard/main.tf +++ b/modules/redis-5.0-communtity-standard/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "5.0" diff --git a/modules/redis-5.0-communtity-standard/variables.tf b/modules/redis-5.0-communtity-standard/variables.tf index a2b4e7a..feef307 100644 --- a/modules/redis-5.0-communtity-standard/variables.tf +++ b/modules/redis-5.0-communtity-standard/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-5.0-enterprise-cluster-enhanced-performance/main.tf b/modules/redis-5.0-enterprise-cluster-enhanced-performance/main.tf index 1a79dfe..f567577 100644 --- a/modules/redis-5.0-enterprise-cluster-enhanced-performance/main.tf +++ b/modules/redis-5.0-enterprise-cluster-enhanced-performance/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "5.0" diff --git a/modules/redis-5.0-enterprise-cluster-enhanced-performance/variables.tf b/modules/redis-5.0-enterprise-cluster-enhanced-performance/variables.tf index a2b4e7a..feef307 100644 --- a/modules/redis-5.0-enterprise-cluster-enhanced-performance/variables.tf +++ b/modules/redis-5.0-enterprise-cluster-enhanced-performance/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-5.0-enterprise-rwsplit-enhanced-performance-type/main.tf b/modules/redis-5.0-enterprise-rwsplit-enhanced-performance-type/main.tf index 4b312f4..2d92ccf 100644 --- a/modules/redis-5.0-enterprise-rwsplit-enhanced-performance-type/main.tf +++ b/modules/redis-5.0-enterprise-rwsplit-enhanced-performance-type/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "5.0" diff --git a/modules/redis-5.0-enterprise-rwsplit-enhanced-performance-type/variables.tf b/modules/redis-5.0-enterprise-rwsplit-enhanced-performance-type/variables.tf index b15a00b..03815b8 100644 --- a/modules/redis-5.0-enterprise-rwsplit-enhanced-performance-type/variables.tf +++ b/modules/redis-5.0-enterprise-rwsplit-enhanced-performance-type/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/modules/redis-5.0-enterprise-standard-enhanced-performance-type/main.tf b/modules/redis-5.0-enterprise-standard-enhanced-performance-type/main.tf index cf7bd39..967821f 100644 --- a/modules/redis-5.0-enterprise-standard-enhanced-performance-type/main.tf +++ b/modules/redis-5.0-enterprise-standard-enhanced-performance-type/main.tf @@ -1,10 +1,3 @@ -provider "alicloud" { - profile = var.profile != "" ? var.profile : null - shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null - region = var.region != "" ? var.region : null - skip_region_validation = var.skip_region_validation - configuration_source = "terraform-alicloud-modules/redis" -} locals { engine = "Redis" engine_version = "5.0" diff --git a/modules/redis-5.0-enterprise-standard-enhanced-performance-type/variables.tf b/modules/redis-5.0-enterprise-standard-enhanced-performance-type/variables.tf index b15a00b..03815b8 100644 --- a/modules/redis-5.0-enterprise-standard-enhanced-performance-type/variables.tf +++ b/modules/redis-5.0-enterprise-standard-enhanced-performance-type/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 } diff --git a/variables.tf b/variables.tf index 1b76b85..ed14339 100644 --- a/variables.tf +++ b/variables.tf @@ -3,22 +3,22 @@ ################# variable "profile" { - description = "The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." + description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable." default = "" } variable "shared_credentials_file" { - description = "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." + description = "(Deprecated from version 1.3.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." default = "" } variable "region" { - description = "The region used to launch this module resources." + description = "(Deprecated from version 1.3.0)The region used to launch this module resources." default = "" } variable "skip_region_validation" { - description = "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)." + description = "(Deprecated from version 1.3.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 }