@@ -83,7 +83,22 @@ func TestAccTencentCloudDnspodRecordResource_MX(t *testing.T) {
83
83
CheckDestroy : testAccCheckDnspodRecordDestroy ,
84
84
Steps : []resource.TestStep {
85
85
{
86
- Config : testAccTencentCloudDnspodRecordMx ,
86
+ Config : testAccTencentCloudDnspodRecordMXValueWithOutDot ,
87
+ Check : resource .ComposeTestCheckFunc (
88
+ testAccCheckDnspodRecordExists ("tencentcloud_dnspod_record.demo" ),
89
+ resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "domain" , "iac-tf.cloud" ),
90
+ resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "record_type" , "MX" ),
91
+ resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "record_line" , "默认" ),
92
+ resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "value" , "1.2.3.9" ),
93
+ resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "sub_domain" , "@" ),
94
+ resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "mx" , "10" ),
95
+ resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "ttl" , "86400" ),
96
+ resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "status" , "ENABLE" ),
97
+ resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "remark" , "terraform-test" ),
98
+ ),
99
+ },
100
+ {
101
+ Config : testAccTencentCloudDnspodRecordMXValueWithDot ,
87
102
Check : resource .ComposeTestCheckFunc (
88
103
testAccCheckDnspodRecordExists ("tencentcloud_dnspod_record.demo" ),
89
104
resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "domain" , "iac-tf.cloud" ),
@@ -100,6 +115,7 @@ func TestAccTencentCloudDnspodRecordResource_MX(t *testing.T) {
100
115
{
101
116
Config : testAccTencentCloudDnspodRecordMxUpdate ,
102
117
Check : resource .ComposeTestCheckFunc (
118
+ testAccCheckDnspodRecordExists ("tencentcloud_dnspod_record.demo" ),
103
119
resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "domain" , "iac-tf.cloud" ),
104
120
resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "record_type" , "MX" ),
105
121
resource .TestCheckResourceAttr ("tencentcloud_dnspod_record.demo" , "record_line" , "默认" ),
@@ -231,7 +247,20 @@ resource "tencentcloud_dnspod_record" "demo" {
231
247
}
232
248
`
233
249
234
- const testAccTencentCloudDnspodRecordMx = `
250
+ const testAccTencentCloudDnspodRecordMXValueWithOutDot = `
251
+ resource "tencentcloud_dnspod_record" "demo" {
252
+ domain = "iac-tf.cloud"
253
+ record_type = "MX"
254
+ record_line = "默认"
255
+ value = "1.2.3.9"
256
+ sub_domain = "@"
257
+ mx = 10
258
+ ttl = 86400
259
+ status = "ENABLE"
260
+ remark = "terraform-test"
261
+ }
262
+ `
263
+ const testAccTencentCloudDnspodRecordMXValueWithDot = `
235
264
resource "tencentcloud_dnspod_record" "demo" {
236
265
domain = "iac-tf.cloud"
237
266
record_type = "MX"
@@ -244,6 +273,7 @@ resource "tencentcloud_dnspod_record" "demo" {
244
273
remark = "terraform-test"
245
274
}
246
275
`
276
+
247
277
const testAccTencentCloudDnspodRecordMxUpdate = `
248
278
resource "tencentcloud_dnspod_record" "demo" {
249
279
domain = "iac-tf.cloud"
0 commit comments