You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: "Indicate whether to delete instance directly or not. Default is `false`. If set true, the instance will be deleted instead of staying recycle bin. Note: only works for `PREPAID` instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect.",
168
170
},
171
+
"wait_switch": {
172
+
Type: schema.TypeInt,
173
+
Optional: true,
174
+
Description: "Switch the method of accessing new instances, default is `0`. Supported values include: `0` - switch immediately, `1` - switch in time window.",
175
+
},
169
176
// Computed values
170
177
"intranet_ip": {
171
178
Type: schema.TypeString,
@@ -1149,6 +1156,7 @@ func mysqlAllInstanceRoleUpdate(ctx context.Context, d *schema.ResourceData, met
1149
1156
engineVersion:=""
1150
1157
varupgradeSubversionint64
1151
1158
varmaxDelayTimeint64
1159
+
varwaitSwitchint64=0
1152
1160
ifv, ok:=d.GetOk("engine_version"); ok {
1153
1161
engineVersion=v.(string)
1154
1162
}
@@ -1158,37 +1166,65 @@ func mysqlAllInstanceRoleUpdate(ctx context.Context, d *schema.ResourceData, met
//internal version: replace redisFail begin, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.
538
+
returnfmt.Errorf("Fail to get info from redis, reaseon %s", err.Error())
539
+
//internal version: replace redisFail end, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.
511
540
}
512
-
ife!=nil {
513
-
returnresource.NonRetryableError(e)
514
-
}
515
-
if!has {
516
-
d.SetId("")
517
-
onlineHas=false
541
+
if!onlineHas {
518
542
returnnil
519
543
}
520
-
returnnil
521
-
})
522
-
iferr!=nil {
523
-
//internal version: replace redisFail begin, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.
524
-
returnfmt.Errorf("Fail to get info from redis, reaseon %s", err.Error())
525
-
//internal version: replace redisFail end, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.
526
-
}
527
-
if!onlineHas {
528
-
returnnil
529
544
}
530
545
531
546
statusName:=REDIS_STATUS[*info.Status]
532
547
ifstatusName=="" {
533
-
err=fmt.Errorf("redis read unkwnow status %d", *info.Status)
548
+
err:=fmt.Errorf("redis read unkwnow status %d", *info.Status)
534
549
log.Printf("[CRITAL]%s redis read status name error, reason:%s\n", logId, err.Error())
535
550
returnerr
536
551
}
@@ -829,7 +844,13 @@ func resourceTencentCloudRedisInstanceUpdate(d *schema.ResourceData, meta interf
Copy file name to clipboardExpand all lines: website/docs/r/mysql_instance.html.markdown
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,6 +166,7 @@ The following arguments are supported:
166
166
*`tags` - (Optional, Map) Instance tags.
167
167
*`upgrade_subversion` - (Optional, Int) Whether it is a kernel subversion upgrade, supported values: 1 - upgrade the kernel subversion; 0 - upgrade the database engine version. Only need to fill in when upgrading kernel subversion and engine version.
168
168
*`vpc_id` - (Optional, String) ID of VPC, which can be modified once every 24 hours and can't be removed.
169
+
*`wait_switch` - (Optional, Int) Switch the method of accessing new instances, default is `0`. Supported values include: `0` - switch immediately, `1` - switch in time window.
Copy file name to clipboardExpand all lines: website/docs/r/mysql_readonly_instance.html.markdown
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,9 +102,11 @@ The following arguments are supported:
102
102
*`period` - (Optional, Int, **Deprecated**) It has been deprecated from version 1.36.0. Please use `prepaid_period` instead. Period of instance. NOTES: Only supported prepaid instance.
103
103
*`prepaid_period` - (Optional, Int) Period of instance. NOTES: Only supported prepaid instance.
104
104
*`security_groups` - (Optional, Set: [`String`]) Security groups to use.
105
+
*`slave_deploy_mode` - (Optional, Int) Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
105
106
*`subnet_id` - (Optional, String) Private network ID. If `vpc_id` is set, this value is required.
106
107
*`tags` - (Optional, Map) Instance tags.
107
108
*`vpc_id` - (Optional, String) ID of VPC, which can be modified once every 24 hours and can't be removed.
109
+
*`wait_switch` - (Optional, Int) Switch the method of accessing new instances, default is `0`. Supported values include: `0` - switch immediately, `1` - switch in time window.
108
110
*`zone` - (Optional, String) Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
Copy file name to clipboardExpand all lines: website/docs/r/redis_instance.html.markdown
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -263,6 +263,7 @@ The following arguments are supported:
263
263
*`type_id` - (Optional, Int) Instance type. Available values reference data source `tencentcloud_redis_zone_config` or [document](https://intl.cloud.tencent.com/document/product/239/32069), toggle immediately when modified.
264
264
*`type` - (Optional, String, ForceNew, **Deprecated**) It has been deprecated from version 1.33.1. Please use 'type_id' instead. Instance type. Available values: `cluster_ckv`,`cluster_redis5.0`,`cluster_redis`,`master_slave_ckv`,`master_slave_redis4.0`,`master_slave_redis5.0`,`master_slave_redis`,`standalone_redis`, specific region support specific types, need to refer data `tencentcloud_redis_zone_config`.
265
265
*`vpc_id` - (Optional, String) ID of the vpc with which the instance is to be associated. When the `operation_network` is `changeVpc` or `changeBaseToVpc`, this parameter needs to be configured.
266
+
*`wait_switch` - (Optional, Int) Switching mode: `1`-maintenance time window switching, `2`-immediate switching, default value `2`.
0 commit comments