Skip to content

Commit a5d4fd1

Browse files
authored
fix(sqlserver): [120446728] tencentcloud_sqlserver_instance deprecated field ha_type (#2923)
* add * add
1 parent 0692840 commit a5d4fd1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.changelog/2923.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_sqlserver_instance: deprecated field `ha_type`
3+
```

tencentcloud/services/sqlserver/resource_tc_sqlserver_instance.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ func ResourceTencentCloudSqlserverInstance() *schema.Resource {
160160
Optional: true,
161161
Default: "DUAL",
162162
Description: "Instance type. `DUAL` (dual-server high availability), `CLUSTER` (cluster). Default is `DUAL`.",
163+
Deprecated: "It has been deprecated from version 1.81.136.",
163164
},
164165
"maintenance_week_set": {
165166
Type: schema.TypeSet,
@@ -229,7 +230,6 @@ func resourceTencentCloudSqlserverInstanceCreate(d *schema.ResourceData, meta in
229230
startTime = d.Get("maintenance_start_time").(string)
230231
timeSpan = d.Get("maintenance_time_span").(int)
231232
multiZones = d.Get("multi_zones").(bool)
232-
haType = d.Get("ha_type").(string)
233233
securityGroups = make([]string, 0)
234234
)
235235

@@ -256,7 +256,6 @@ func resourceTencentCloudSqlserverInstanceCreate(d *schema.ResourceData, meta in
256256
request.Storage = helper.IntInt64(storage)
257257
request.SubnetId = &subnetId
258258
request.VpcId = &vpcId
259-
request.HAType = &haType
260259
request.MultiZones = &multiZones
261260

262261
if payType == svcpostgresql.COMMON_PAYTYPE_POSTPAID {
@@ -657,7 +656,6 @@ func resourceTencentCloudSqlserverInstanceRead(d *schema.ResourceData, meta inte
657656
}
658657
_ = d.Set("project_id", instance.ProjectId)
659658
_ = d.Set("engine_version", instance.Version)
660-
_ = d.Set("ha_type", SQLSERVER_HA_TYPE_FLAGS[*instance.HAFlag])
661659

662660
//maintanence
663661
weekSet, startTime, timeSpan, outErr := sqlserverService.DescribeMaintenanceSpan(ctx, instanceId)

website/docs/r/sqlserver_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The following arguments are supported:
5555
* `availability_zone` - (Optional, String, ForceNew) Availability zone.
5656
* `charge_type` - (Optional, String, ForceNew) Pay type of the SQL Server instance. Available values `PREPAID`, `POSTPAID_BY_HOUR`.
5757
* `engine_version` - (Optional, String, ForceNew) Version of the SQL Server database engine. Allowed values are `2008R2`(SQL Server 2008 Enterprise), `2012SP3`(SQL Server 2012 Enterprise), `2016SP1` (SQL Server 2016 Enterprise), `201602`(SQL Server 2016 Standard) and `2017`(SQL Server 2017 Enterprise). Default is `2008R2`.
58-
* `ha_type` - (Optional, String, ForceNew) Instance type. `DUAL` (dual-server high availability), `CLUSTER` (cluster). Default is `DUAL`.
58+
* `ha_type` - (Optional, String, ForceNew, **Deprecated**) It has been deprecated from version 1.81.136. Instance type. `DUAL` (dual-server high availability), `CLUSTER` (cluster). Default is `DUAL`.
5959
* `maintenance_start_time` - (Optional, String) Start time of the maintenance in one day, format like `HH:mm`.
6060
* `maintenance_time_span` - (Optional, Int) The timespan of maintenance in one day, unit is hour.
6161
* `maintenance_week_set` - (Optional, Set: [`Int`]) A list of integer indicates weekly maintenance. For example, [2,7] presents do weekly maintenance on every Tuesday and Sunday.

0 commit comments

Comments
 (0)