@@ -39,8 +39,8 @@ func TestAccTencentCloudScfFunction_basic(t *testing.T) {
3939 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "subnet_id" , "" ),
4040 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "namespace" , "default" ),
4141 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "role" , "" ),
42- resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cls_logset_id" , " " ),
43- resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cls_topic_id" , " " ),
42+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cls_logset_id" ),
43+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cls_topic_id" ),
4444 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "l5_enable" , "false" ),
4545 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "zip_file" ),
4646 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "triggers.#" , "0" ),
@@ -122,8 +122,8 @@ func TestAccTencentCloudScfFunction_cos(t *testing.T) {
122122 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "subnet_id" , "" ),
123123 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "namespace" , "default" ),
124124 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "role" , "" ),
125- resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cls_logset_id" , " " ),
126- resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cls_topic_id" , " " ),
125+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cls_logset_id" ),
126+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cls_topic_id" ),
127127 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "l5_enable" , "false" ),
128128 resource .TestCheckNoResourceAttr ("tencentcloud_scf_function.foo" , "zip_file" ),
129129 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cos_bucket_name" ),
@@ -186,8 +186,8 @@ func TestAccTencentCloudScfFunction_role(t *testing.T) {
186186 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "subnet_id" , "" ),
187187 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "namespace" , "default" ),
188188 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "role" , "scf-role-test" ),
189- resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cls_logset_id" , " " ),
190- resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cls_topic_id" , " " ),
189+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cls_logset_id" ),
190+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cls_topic_id" ),
191191 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "l5_enable" , "false" ),
192192 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "zip_file" ),
193193 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "modify_time" ),
@@ -246,8 +246,8 @@ func TestAccTencentCloudScfFunction_trigger(t *testing.T) {
246246 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "subnet_id" , "" ),
247247 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "namespace" , "default" ),
248248 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "role" , "" ),
249- resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cls_logset_id" , " " ),
250- resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cls_topic_id" , " " ),
249+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cls_logset_id" ),
250+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cls_topic_id" ),
251251 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "l5_enable" , "false" ),
252252 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "zip_file" ),
253253 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "triggers.#" , "2" ),
@@ -316,8 +316,8 @@ func TestAccTencentCloudScfFunction_customNamespace(t *testing.T) {
316316 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "subnet_id" , "" ),
317317 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "namespace" , "ci-test-scf" ),
318318 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "role" , "" ),
319- resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cls_logset_id" , " " ),
320- resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cls_topic_id" , " " ),
319+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cls_logset_id" ),
320+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cls_topic_id" ),
321321 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "l5_enable" , "false" ),
322322 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "zip_file" ),
323323 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "triggers.#" , "0" ),
@@ -434,6 +434,7 @@ resource "tencentcloud_scf_function" "foo" {
434434 name = "%s"
435435 handler = "first.do_it_first"
436436 runtime = "Python3.6"
437+ enable_public_net = true
437438
438439 zip_file = "%s"
439440
@@ -449,6 +450,7 @@ resource "tencentcloud_scf_function" "foo" {
449450 name = "%s"
450451 handler = "second.do_it_second"
451452 runtime = "Python3.6"
453+ enable_public_net = true
452454
453455 description = "test"
454456 mem_size = 1536
@@ -487,6 +489,7 @@ resource "tencentcloud_scf_function" "foo" {
487489 name = "ci-test-function-cos"
488490 handler = "first.do_it_first"
489491 runtime = "Python3.6"
492+ enable_public_net = true
490493
491494 cos_bucket_name = tencentcloud_cos_bucket.foo.id
492495 cos_object_name = tencentcloud_cos_bucket_object.myobject.key
@@ -524,6 +527,7 @@ resource "tencentcloud_scf_function" "foo" {
524527 name = "%s"
525528 handler = "first.do_it_first"
526529 runtime = "Python3.6"
530+ enable_public_net = true
527531
528532 cos_bucket_name = tencentcloud_cos_bucket.bar.id
529533 cos_object_name = tencentcloud_cos_bucket_object.bar.key
@@ -559,6 +563,7 @@ resource "tencentcloud_scf_function" "foo" {
559563 handler = "first.do_it_first"
560564 runtime = "Python3.6"
561565 role = tencentcloud_cam_role.foo.name
566+ enable_public_net = true
562567
563568 zip_file = "%s"
564569}
@@ -599,6 +604,7 @@ resource "tencentcloud_scf_function" "foo" {
599604 handler = "first.do_it_first"
600605 runtime = "Python3.6"
601606 role = tencentcloud_cam_role.bar.name
607+ enable_public_net = true
602608
603609 zip_file = "%s"
604610}
@@ -614,6 +620,7 @@ resource "tencentcloud_scf_function" "foo" {
614620 name = "%s"
615621 handler = "first.do_it_first"
616622 runtime = "Python3.6"
623+ enable_public_net = true
617624
618625 zip_file = "%s"
619626
@@ -647,6 +654,7 @@ resource "tencentcloud_scf_function" "foo" {
647654 name = "%s"
648655 handler = "first.do_it_first"
649656 runtime = "Python3.6"
657+ enable_public_net = true
650658
651659 zip_file = "%s"
652660
@@ -676,6 +684,7 @@ resource "tencentcloud_scf_function" "foo" {
676684 name = "%s"
677685 handler = "first.do_it_first"
678686 runtime = "Python3.6"
687+ enable_public_net = true
679688
680689 zip_file = "%s"
681690}
0 commit comments