Skip to content

fix(sqlserver): [120446728] tencentcloud_sqlserver_instance deprecated field ha_type #2923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 1, 2024
Merged
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
3 changes: 3 additions & 0 deletions .changelog/2923.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_sqlserver_instance: deprecated field `ha_type`
```
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ func ResourceTencentCloudSqlserverInstance() *schema.Resource {
Optional: true,
Default: "DUAL",
Description: "Instance type. `DUAL` (dual-server high availability), `CLUSTER` (cluster). Default is `DUAL`.",
Deprecated: "It has been deprecated from version 1.81.136.",
},
"maintenance_week_set": {
Type: schema.TypeSet,
Expand Down Expand Up @@ -229,7 +230,6 @@ func resourceTencentCloudSqlserverInstanceCreate(d *schema.ResourceData, meta in
startTime = d.Get("maintenance_start_time").(string)
timeSpan = d.Get("maintenance_time_span").(int)
multiZones = d.Get("multi_zones").(bool)
haType = d.Get("ha_type").(string)
securityGroups = make([]string, 0)
)

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

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

//maintanence
weekSet, startTime, timeSpan, outErr := sqlserverService.DescribeMaintenanceSpan(ctx, instanceId)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/sqlserver_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The following arguments are supported:
* `availability_zone` - (Optional, String, ForceNew) Availability zone.
* `charge_type` - (Optional, String, ForceNew) Pay type of the SQL Server instance. Available values `PREPAID`, `POSTPAID_BY_HOUR`.
* `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`.
* `ha_type` - (Optional, String, ForceNew) Instance type. `DUAL` (dual-server high availability), `CLUSTER` (cluster). Default is `DUAL`.
* `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`.
* `maintenance_start_time` - (Optional, String) Start time of the maintenance in one day, format like `HH:mm`.
* `maintenance_time_span` - (Optional, Int) The timespan of maintenance in one day, unit is hour.
* `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.
Expand Down
Loading