Skip to content

Commit 2f87d01

Browse files
authored
domain set force_new (#1200)
1 parent 5889c84 commit 2f87d01

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

tencentcloud/resource_tc_dnspod_record.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ func resourceTencentCloudDnspodRecord() *schema.Resource {
3838
"domain": {
3939
Type: schema.TypeString,
4040
Required: true,
41+
ForceNew: true,
4142
Description: "The Domain.",
4243
},
4344
"record_type": {
@@ -210,32 +211,22 @@ func resourceTencentCloudDnspodRecordUpdate(d *schema.ResourceData, meta interfa
210211
request.Value = &value
211212
request.SubDomain = &subDomain
212213

213-
d.SetPartial("record_type")
214-
d.SetPartial("record_line")
215-
d.SetPartial("value")
216-
d.SetPartial("sub_domain")
217-
218214
if d.HasChange("status") {
219215
status := d.Get("status").(string)
220216
request.Status = &status
221-
d.SetPartial("status")
222217
}
223218
if d.HasChange("mx") {
224219
if v, ok := d.GetOk("mx"); ok {
225220
request.MX = helper.IntUint64(v.(int))
226-
d.SetPartial("mx")
227221
}
228222
}
229223
if d.HasChange("ttl") {
230224
ttl := d.Get("ttl").(int)
231225
request.TTL = helper.IntUint64(ttl)
232-
d.SetPartial("ttl")
233226
}
234227
if d.HasChange("weight") {
235228
weight := d.Get("weight").(int)
236229
request.TTL = helper.IntUint64(weight)
237-
d.SetPartial("weight")
238-
239230
}
240231
d.Partial(true)
241232
err = resource.Retry(readRetryTimeout, func() *resource.RetryError {

website/docs/r/dnspod_record.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ resource "tencentcloud_dnspod_record" "demo" {
2727

2828
The following arguments are supported:
2929

30-
* `domain` - (Required, String) The Domain.
30+
* `domain` - (Required, String, ForceNew) The Domain.
3131
* `record_line` - (Required, String) The record line.
3232
* `record_type` - (Required, String) The record type.
3333
* `value` - (Required, String) The record value.

0 commit comments

Comments
 (0)