@@ -45,19 +45,12 @@ resource "hostingde_zone" "test" {
45
45
type = "NATIVE"
46
46
email = "hostmaster@example2.test"
47
47
}
48
- resource "hostingde_record" "test_mx " {
48
+ resource "hostingde_record" "test_mx2 " {
49
49
zone_id = hostingde_zone.test.id
50
50
name = "example2.test"
51
51
type = "MX"
52
- content = "mail.example2.test"
53
- priority = 10
54
- }
55
- resource "hostingde_record" "test_mx" {
56
- zone_id = hostingde_zone.test.id
57
- name = "example2.test"
58
- type = "MX"
59
- content = "mail.example2.test"
60
- priority = 10
52
+ content = "mail2.example2.test"
53
+ priority = 20
61
54
}
62
55
` ,
63
56
Check : resource .ComposeAggregateTestCheckFunc (
@@ -71,6 +64,16 @@ resource "hostingde_record" "test_mx" {
71
64
resource .TestCheckResourceAttr ("hostingde_record.test_mx" , "content" , "mail.example2.test" ),
72
65
// Verify dynamic values have any value set in the state.
73
66
resource .TestCheckResourceAttrSet ("hostingde_record.test_mx" , "id" ),
67
+ // Verify name attribute.
68
+ resource .TestCheckResourceAttr ("hostingde_record.test_mx2" , "name" , "example2.test" ),
69
+ // Verify type attribute.
70
+ resource .TestCheckResourceAttr ("hostingde_record.test_mx2" , "type" , "MX" ),
71
+ // Verify priority attribute.
72
+ resource .TestCheckResourceAttr ("hostingde_record.test_mx2" , "priority" , "20" ),
73
+ // Verify email attribute.
74
+ resource .TestCheckResourceAttr ("hostingde_record.test_mx2" , "content" , "mail2.example2.test" ),
75
+ // Verify dynamic values have any value set in the state.
76
+ resource .TestCheckResourceAttrSet ("hostingde_record.test_mx2" , "id" ),
74
77
),
75
78
},
76
79
// Create and read TXT testing
0 commit comments