Skip to content

Commit dbe0785

Browse files
authored
fix: modify zone (#2435)
* fix: modify zone * feat: add 2435 changelog
1 parent adf912f commit dbe0785

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.changelog/2435.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_mariadb_hour_db_instance: Fix zone sorting problem
3+
```

tencentcloud/services/mariadb/resource_tc_mariadb_hour_db_instance.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func ResourceTencentCloudMariadbHourDbInstance() *schema.Resource {
2727
},
2828
Schema: map[string]*schema.Schema{
2929
"zones": {
30-
Type: schema.TypeSet,
30+
Type: schema.TypeList,
3131
Elem: &schema.Schema{Type: schema.TypeString},
3232
Required: true,
3333
Description: "available zone of instance.",
@@ -113,9 +113,9 @@ func resourceTencentCloudMariadbHourDbInstanceCreate(d *schema.ResourceData, met
113113
)
114114

115115
if v, ok := d.GetOk("zones"); ok {
116-
zonesSet := v.(*schema.Set).List()
117-
for i := range zonesSet {
118-
zones := zonesSet[i].(string)
116+
zonesList := v.([]interface{})
117+
for i := range zonesList {
118+
zones := zonesList[i].(string)
119119
request.Zones = append(request.Zones, &zones)
120120
}
121121
}

website/docs/r/mariadb_hour_db_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The following arguments are supported:
4040
* `memory` - (Required, Int) instance memory.
4141
* `node_count` - (Required, Int) number of node for instance.
4242
* `storage` - (Required, Int) instance disk storage.
43-
* `zones` - (Required, Set: [`String`]) available zone of instance.
43+
* `zones` - (Required, List: [`String`]) available zone of instance.
4444
* `db_version_id` - (Optional, String) db engine version, default to 10.1.9.
4545
* `instance_name` - (Optional, String) name of this instance.
4646
* `project_id` - (Optional, Int) project id.

0 commit comments

Comments
 (0)