Skip to content
Open
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
15 changes: 15 additions & 0 deletions alicloud/resource_alicloud_kvstore_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,18 @@ func resourceAliCloudKvstoreInstance() *schema.Resource {
Computed: true,
ValidateFunc: StringInSlice([]string{"Disable", "Enable", "Update"}, false),
},
"cert_download_url": {
Type: schema.TypeString,
Computed: true,
},
"ssl_expired_time": {
Type: schema.TypeString,
Computed: true,
},
"cert_common_name": {
Type: schema.TypeString,
Computed: true,
},
"secondary_zone_id": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -725,6 +737,9 @@ func resourceAliCloudKvstoreInstanceRead(d *schema.ResourceData, meta interface{
}
} else {
d.Set("ssl_enable", describeInstanceSSLObject.SSLEnabled)
d.Set("cert_download_url", describeInstanceSSLObject.CertDownloadURL)
d.Set("ssl_expired_time", describeInstanceSSLObject.SSLExpiredTime)
d.Set("cert_common_name", describeInstanceSSLObject.CertCommonName)
}

var securityIpGroupName string
Expand Down
18 changes: 15 additions & 3 deletions alicloud/resource_alicloud_kvstore_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,10 @@ func TestAccAliCloudKVStoreRedisInstance_6_0(t *testing.T) {
}),
Check: resource.ComposeTestCheckFunc(
testAccCheck(map[string]string{
"ssl_enable": "Enable",
"ssl_enable": "Enable",
"cert_download_url": CHECKSET,
"ssl_expired_time": CHECKSET,
"cert_common_name": CHECKSET,
}),
),
},
Expand Down Expand Up @@ -684,7 +687,10 @@ func TestAccAliCloudKVStoreRedisInstance_6_0(t *testing.T) {
}),
Check: resource.ComposeTestCheckFunc(
testAccCheck(map[string]string{
"ssl_enable": "Disable",
"ssl_enable": "Disable",
"cert_download_url": "",
"ssl_expired_time": "",
"cert_common_name": "",
}),
),
},
Expand Down Expand Up @@ -2198,7 +2204,10 @@ func TestAccAliCloudKVStoreRedisInstance_5_0_memory_classic_cluster(t *testing.T
}),
Check: resource.ComposeTestCheckFunc(
testAccCheck(map[string]string{
"ssl_enable": "Enable",
"ssl_enable": "Enable",
"cert_download_url": CHECKSET,
"ssl_expired_time": CHECKSET,
"cert_common_name": CHECKSET,
}),
),
},
Expand Down Expand Up @@ -2338,6 +2347,9 @@ func TestAccAliCloudKVStoreRedisInstance_5_0_memory_classic_cluster(t *testing.T
testAccCheck(map[string]string{
"ssl_enable": "Disable",
"private_connection_prefix": CHECKSET,
"cert_download_url": "",
"ssl_expired_time": "",
"cert_common_name": "",
}),
),
},
Expand Down
21 changes: 21 additions & 0 deletions alicloud/resource_alicloud_redis_tair_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,18 @@ func resourceAliCloudRedisTairInstance() *schema.Resource {
Computed: true,
ValidateFunc: StringInSlice([]string{"Disable", "Enable", "Update"}, false),
},
"cert_download_url": {
Type: schema.TypeString,
Computed: true,
},
"ssl_expired_time": {
Type: schema.TypeString,
Computed: true,
},
"cert_common_name": {
Type: schema.TypeString,
Computed: true,
},
"status": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -537,6 +549,15 @@ func resourceAliCloudRedisTairInstanceRead(d *schema.ResourceData, meta interfac
if objectRaw["SSLEnabled"] != nil {
d.Set("ssl_enabled", objectRaw["SSLEnabled"])
}
if objectRaw["CertDownloadURL"] != nil {
d.Set("cert_download_url", objectRaw["CertDownloadURL"])
}
if objectRaw["SSLExpiredTime"] != nil {
d.Set("ssl_expired_time", objectRaw["SSLExpiredTime"])
}
if objectRaw["CertCommonName"] != nil {
d.Set("cert_common_name", objectRaw["CertCommonName"])
}
if objectRaw["InstanceId"] != nil {
d.Set("tair_instance_id", objectRaw["InstanceId"])
}
Expand Down
5 changes: 4 additions & 1 deletion alicloud/resource_alicloud_redis_tair_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,10 @@ func TestAccAliCloudRedisTairInstance_basic6473_raw(t *testing.T) {
}),
Check: resource.ComposeTestCheckFunc(
testAccCheck(map[string]string{
"ssl_enabled": "Enable",
"ssl_enabled": "Enable",
"cert_download_url": CHECKSET,
"ssl_expired_time": CHECKSET,
"cert_common_name": CHECKSET,
}),
),
},
Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/kvstore_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ The following attributes are exported:
* `qps` - Theoretical maximum QPS value.
* `connection_domain`- Intranet connection address of the KVStore instance.
* `status` - The status of KVStore DBInstance.
* `cert_download_url` - The download URL of the SSL certificate.
* `ssl_expired_time` - The expiration time of the SSL certificate.
* `cert_common_name` - The common name (CN) of the SSL certificate.

## Timeouts

Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/redis_tair_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ The following attributes are exported:
* `region_id` - Region Id
* `status` - The status of the resource
* `tair_instance_id` - The ID of the resource.
* `cert_download_url` - The download URL of the SSL certificate.
* `ssl_expired_time` - The expiration time of the SSL certificate.
* `cert_common_name` - The common name (CN) of the SSL certificate.

## Timeouts

Expand Down
Loading