@@ -12,7 +12,8 @@ import (
1212var testAPIGatewayServiceResourceName = "tencentcloud_api_gateway_service"
1313var testAPIGatewayServiceResourceKey = testAPIGatewayServiceResourceName + ".service"
1414
15- func TestAccTencentCloudNeedFixAPIGateWayServiceResource (t * testing.T ) {
15+ // go test -i; go test -test.run TestAccTencentCloudApiGateWayServiceResource_basic -v
16+ func TestAccTencentCloudApiGateWayServiceResource_basic (t * testing.T ) {
1617 t .Parallel ()
1718 resource .Test (t , resource.TestCase {
1819 PreCheck : func () { testAccPreCheck (t ) },
@@ -30,15 +31,17 @@ func TestAccTencentCloudNeedFixAPIGateWayServiceResource(t *testing.T) {
3031 resource .TestCheckResourceAttrSet (testAPIGatewayServiceResourceKey , "create_time" ),
3132 resource .TestCheckResourceAttrSet (testAPIGatewayServiceResourceKey , "internal_sub_domain" ),
3233 resource .TestCheckResourceAttrSet (testAPIGatewayServiceResourceKey , "inner_http_port" ),
34+ resource .TestCheckResourceAttr (testAPIGatewayServiceResourceKey , "tags.test-key" , "test-value" ),
3335 resource .TestCheckResourceAttr (testAPIGatewayServiceResourceKey , "release_limit" , "500" ),
3436 resource .TestCheckResourceAttr (testAPIGatewayServiceResourceKey , "pre_limit" , "500" ),
3537 resource .TestCheckResourceAttr (testAPIGatewayServiceResourceKey , "test_limit" , "500" ),
3638 ),
3739 },
3840 {
39- ResourceName : testAPIGatewayServiceResourceKey ,
40- ImportState : true ,
41- ImportStateVerify : true ,
41+ ResourceName : testAPIGatewayServiceResourceKey ,
42+ ImportState : true ,
43+ ImportStateVerify : true ,
44+ ImportStateVerifyIgnore : []string {"modify_time" },
4245 },
4346 {
4447 Config : testAccAPIGatewayServiceUpdate ,
@@ -53,6 +56,7 @@ func TestAccTencentCloudNeedFixAPIGateWayServiceResource(t *testing.T) {
5356 resource .TestCheckResourceAttrSet (testAPIGatewayServiceResourceKey , "internal_sub_domain" ),
5457 resource .TestCheckResourceAttrSet (testAPIGatewayServiceResourceKey , "outer_sub_domain" ),
5558 resource .TestCheckResourceAttrSet (testAPIGatewayServiceResourceKey , "inner_http_port" ),
59+ resource .TestCheckResourceAttr (testAPIGatewayServiceResourceKey , "tags.test-key1" , "test-value1" ),
5660 resource .TestCheckResourceAttr (testAPIGatewayServiceResourceKey , "release_limit" , "100" ),
5761 resource .TestCheckResourceAttr (testAPIGatewayServiceResourceKey , "pre_limit" , "100" ),
5862 resource .TestCheckResourceAttr (testAPIGatewayServiceResourceKey , "test_limit" , "100" ),
@@ -121,6 +125,9 @@ resource "tencentcloud_api_gateway_service" "service" {
121125 service_desc = "my nice service"
122126 net_type = ["INNER"]
123127 ip_version = "IPv4"
128+ tags = {
129+ test-key = "test-value"
130+ }
124131 release_limit = 500
125132 pre_limit = 500
126133 test_limit = 500
@@ -133,6 +140,9 @@ resource "tencentcloud_api_gateway_service" "service" {
133140 service_desc = "your nice service"
134141 net_type = ["INNER", "OUTER"]
135142 ip_version = "IPv4"
143+ tags = {
144+ test-key1 = "test-value1"
145+ }
136146 release_limit = 100
137147 pre_limit = 100
138148 test_limit = 100
0 commit comments