@@ -114,6 +114,7 @@ func TestAccTencentCloudScfFunction_basic(t *testing.T) {
114114 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "triggers.#" , "0" ),
115115 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "modify_time" ),
116116 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "code_size" ),
117+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "function_id" ),
117118 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_result" , "success" ),
118119 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_error" , "" ),
119120 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "err_no" ),
@@ -147,6 +148,7 @@ func TestAccTencentCloudScfFunction_basic(t *testing.T) {
147148 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "eip_fixed" , "false" ),
148149 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "eips.#" , "0" ),
149150 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "host" , "" ),
151+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "function_id" ),
150152 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "vip" , "" ),
151153 resource .TestCheckNoResourceAttr ("tencentcloud_scf_function.foo" , "tags.test" ),
152154 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "tags.abc" , "abc" ),
@@ -207,6 +209,7 @@ func TestAccTencentCloudScfFunction_cos(t *testing.T) {
207209 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "cos_bucket_region" ),
208210 resource .TestCheckNoResourceAttr ("tencentcloud_scf_function.foo" , "demo_id" ),
209211 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "modify_time" ),
212+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "function_id" ),
210213 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "code_size" ),
211214 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_result" , "success" ),
212215 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_error" , "" ),
@@ -230,6 +233,7 @@ func TestAccTencentCloudScfFunction_cos(t *testing.T) {
230233 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_result" , "success" ),
231234 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_error" , "" ),
232235 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "err_no" ),
236+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "function_id" ),
233237 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "install_dependency" , "false" ),
234238 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "status" , svcscf .SCF_FUNCTION_STATUS_ACTIVE ),
235239 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "status_desc" , "" ),
@@ -267,6 +271,7 @@ func TestAccTencentCloudScfFunction_role(t *testing.T) {
267271 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "l5_enable" , "false" ),
268272 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "zip_file" ),
269273 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "modify_time" ),
274+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "function_id" ),
270275 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "code_size" ),
271276 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_result" , "success" ),
272277 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_error" , "" ),
@@ -287,6 +292,7 @@ func TestAccTencentCloudScfFunction_role(t *testing.T) {
287292 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "role" , DefaultScfRoleName2 ),
288293 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "zip_file" ),
289294 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "modify_time" ),
295+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "function_id" ),
290296 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "code_size" ),
291297 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_result" , "success" ),
292298 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_error" , "" ),
@@ -328,6 +334,7 @@ func TestAccTencentCloudScfFunction_trigger(t *testing.T) {
328334 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "zip_file" ),
329335 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "triggers.#" , "2" ),
330336 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "modify_time" ),
337+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "function_id" ),
331338 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "code_size" ),
332339 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_result" , "success" ),
333340 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_error" , "" ),
@@ -356,6 +363,7 @@ func TestAccTencentCloudScfFunction_trigger(t *testing.T) {
356363 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "modify_time" ),
357364 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "status" , svcscf .SCF_FUNCTION_STATUS_ACTIVE ),
358365 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "status_desc" , "" ),
366+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "function_id" ),
359367 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "trigger_info.#" , "1" ),
360368 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "trigger_info.0.enable" , "true" ),
361369 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "trigger_info.0.create_time" ),
@@ -395,6 +403,7 @@ func TestAccTencentCloudScfFunction_customNamespace(t *testing.T) {
395403 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "zip_file" ),
396404 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "triggers.#" , "0" ),
397405 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "modify_time" ),
406+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "function_id" ),
398407 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "code_size" ),
399408 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_result" , "success" ),
400409 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "code_error" , "" ),
@@ -431,6 +440,7 @@ func TestAccTencentCloudScfFunction_fs(t *testing.T) {
431440 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "subnet_id" ),
432441 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "zip_file" ),
433442 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "modify_time" ),
443+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "function_id" ),
434444 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cfs_config.#" , "1" ),
435445 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cfs_config.0.user_id" , "10000" ),
436446 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cfs_config.0.user_group_id" , "10000" ),
@@ -449,6 +459,7 @@ func TestAccTencentCloudScfFunction_fs(t *testing.T) {
449459 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "subnet_id" ),
450460 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "zip_file" ),
451461 resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "modify_time" ),
462+ resource .TestCheckResourceAttrSet ("tencentcloud_scf_function.foo" , "function_id" ),
452463 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cfs_config.#" , "1" ),
453464 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cfs_config.0.user_id" , "10000" ),
454465 resource .TestCheckResourceAttr ("tencentcloud_scf_function.foo" , "cfs_config.0.user_group_id" , "10000" ),
0 commit comments