@@ -31,13 +31,31 @@ func TestAccTencentCloudTeoAccelerationDomainResource_basic(t *testing.T) {
31
31
resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "origin_info.0.origin" , "150.109.8.1" ),
32
32
resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "origin_info.0.origin_type" , "IP_DOMAIN" ),
33
33
resource .TestCheckResourceAttrSet ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "cname" ),
34
+ resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "origin_protocol" , "FOLLOW" ),
35
+ resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "http_origin_port" , "80" ),
36
+ resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "https_origin_port" , "443" ),
37
+ resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "ipv6_status" , "follow" ),
34
38
),
35
39
},
36
40
{
37
41
ResourceName : "tencentcloud_teo_acceleration_domain.acceleration_domain" ,
38
42
ImportState : true ,
39
43
ImportStateVerify : true ,
40
44
},
45
+ {
46
+ Config : testAccTeoAccelerationDomainUp ,
47
+ Check : resource .ComposeTestCheckFunc (
48
+ testAccCheckTeoAccelerationDomainExists ("tencentcloud_teo_acceleration_domain.acceleration_domain" ),
49
+ resource .TestCheckResourceAttrSet ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "id" ),
50
+ resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "domain_name" , "test.tf-teo.xyz" ),
51
+ resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "origin_info.#" , "1" ),
52
+ resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "origin_info.0.origin" , "150.109.8.1" ),
53
+ resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "origin_info.0.origin_type" , "IP_DOMAIN" ),
54
+ resource .TestCheckResourceAttrSet ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "cname" ),
55
+ resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "origin_protocol" , "HTTP" ),
56
+ resource .TestCheckResourceAttr ("tencentcloud_teo_acceleration_domain.acceleration_domain" , "http_origin_port" , "81" ),
57
+ ),
58
+ },
41
59
},
42
60
})
43
61
}
@@ -120,3 +138,19 @@ resource "tencentcloud_teo_acceleration_domain" "acceleration_domain" {
120
138
}
121
139
122
140
`
141
+
142
+ const testAccTeoAccelerationDomainUp = testAccTeoZone + `
143
+
144
+ resource "tencentcloud_teo_acceleration_domain" "acceleration_domain" {
145
+ zone_id = tencentcloud_teo_zone.basic.id
146
+ domain_name = "test.tf-teo.xyz"
147
+
148
+ origin_info {
149
+ origin = "150.109.8.1"
150
+ origin_type = "IP_DOMAIN"
151
+ }
152
+ origin_protocol = "HTTP"
153
+ http_origin_port = 81
154
+ }
155
+
156
+ `
0 commit comments