Skip to content

Commit 19c714a

Browse files
authored
fix: modify availability_zone (#2495)
* fix: modify availability_zone * fix: modify doc * feat: add 2495 changelog
1 parent 4aff79b commit 19c714a

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.changelog/2495.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_mysql_instance: `availability_zone` modification supports error reporting
3+
```

tencentcloud/services/cdb/resource_tc_mysql_instance.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ func ResourceTencentCloudMysqlInstance() *schema.Resource {
239239

240240
"availability_zone": {
241241
Type: schema.TypeString,
242-
ForceNew: true,
243242
Optional: true,
244243
Computed: true,
245244
Description: "Indicates which availability zone will be used.",
@@ -1258,6 +1257,10 @@ func mysqlAllInstanceRoleUpdate(ctx context.Context, d *schema.ResourceData, met
12581257
if d.HasChange("param_template_id") {
12591258
return fmt.Errorf("argument `param_template_id` cannot be modified for now")
12601259
}
1260+
1261+
if d.HasChange("availability_zone") {
1262+
return fmt.Errorf("argument `availability_zone` cannot be modified for now")
1263+
}
12611264
return nil
12621265
}
12631266

website/docs/r/mysql_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ The following arguments are supported:
140140
* `mem_size` - (Required, Int) Memory size (in MB).
141141
* `volume_size` - (Required, Int) Disk size (in GB).
142142
* `auto_renew_flag` - (Optional, Int) Auto renew flag. NOTES: Only supported prepaid instance.
143-
* `availability_zone` - (Optional, String, ForceNew) Indicates which availability zone will be used.
143+
* `availability_zone` - (Optional, String) Indicates which availability zone will be used.
144144
* `charge_type` - (Optional, String, ForceNew) Pay type of instance. Valid values:`PREPAID`, `POSTPAID`. Default is `POSTPAID`.
145145
* `cpu` - (Optional, Int) CPU cores.
146146
* `device_type` - (Optional, String) Specify device type, available values: `UNIVERSAL` (default), `EXCLUSIVE`, `BASIC`.

0 commit comments

Comments
 (0)