Skip to content

Commit f6bfa1c

Browse files
ChenHanZhangxiaozhu36
authored andcommitted
kvstore_instance supports the 'ssl_enable', 'secondary_zone_id' attributes.
1 parent 81c6fb0 commit f6bfa1c

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

examples/complete/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ module "redis_example" {
4343
instance_name = var.instance_name
4444
instance_class = data.alicloud_kvstore_instance_classes.default.instance_classes.0
4545
availability_zone = data.alicloud_zones.default.zones.0.id
46+
secondary_zone_id = data.alicloud_zones.default.zones.1.id
47+
ssl_enable = "Enable"
4648
vswitch_id = module.vpc.this_vswitch_ids[0]
4749
security_ips = var.security_ips
4850
instance_charge_type = var.instance_charge_type

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ locals {
77

88
resource "alicloud_kvstore_instance" "this" {
99
count = var.create_instance ? 1 : 0
10+
ssl_enable = var.ssl_enable
1011
instance_type = "Redis"
1112
engine_version = var.engine_version
1213
db_instance_name = var.instance_name
1314
instance_class = var.instance_class
1415
zone_id = var.availability_zone
16+
secondary_zone_id = var.secondary_zone_id
1517
vswitch_id = var.vswitch_id
1618
security_ips = var.security_ips
1719
payment_type = var.instance_charge_type

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ variable "availability_zone" {
5858
default = ""
5959
}
6060

61+
variable "secondary_zone_id" {
62+
description = "The ID of the secondary zone to which you want to migrate the ApsaraDB for Redis instance. If you specify this parameter, the master node and replica node of the instance can be deployed in different zones and disaster recovery is implemented across zones. The instance can withstand failures in data centers."
63+
type = string
64+
default = ""
65+
}
66+
67+
variable "ssl_enable" {
68+
description = "Modifies the SSL status. Valid values: `Disable`, `Enable` and `Update`."
69+
type = string
70+
default = ""
71+
}
72+
6173
variable "vswitch_id" {
6274
description = "The vswitch id used to launch one or more instances."
6375
type = string

0 commit comments

Comments
 (0)