diff --git a/.changelog/2945.txt b/.changelog/2945.txt new file mode 100644 index 0000000000..b29ee48965 --- /dev/null +++ b/.changelog/2945.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_scf_function: Update doc +``` \ No newline at end of file diff --git a/tencentcloud/services/scf/resource_tc_scf_function.md b/tencentcloud/services/scf/resource_tc_scf_function.md index ebf10a5da5..81f00d3f10 100644 --- a/tencentcloud/services/scf/resource_tc_scf_function.md +++ b/tencentcloud/services/scf/resource_tc_scf_function.md @@ -23,13 +23,13 @@ resource "tencentcloud_scf_function" "foo" { runtime = "Python3.6" enable_public_net = true dns_cache = true + vpc_id = "vpc-391sv4w3" + subnet_id = "subnet-ljyn7h30" + zip_file = "/scf/first.zip" + intranet_config { ip_fixed = "ENABLE" } - vpc_id = "vpc-391sv4w3" - subnet_id = "subnet-ljyn7h30" - - zip_file = "/scf/first.zip" tags = { "env" = "test" @@ -46,12 +46,12 @@ resource "tencentcloud_scf_function" "foo" { runtime = "Python3.6" cfs_config { - user_id = "10000" - user_group_id = "10000" - cfs_id = "cfs-xxxxxxxx" - mount_ins_id = "cfs-xxxxxxxx" - local_mount_dir = "/mnt" - remote_mount_dir = "/" + user_id = "10000" + user_group_id = "10000" + cfs_id = "cfs-xxxxxxxx" + mount_ins_id = "cfs-xxxxxxxx" + local_mount_dir = "/mnt" + remote_mount_dir = "/" } } ``` @@ -64,8 +64,7 @@ resource "tencentcloud_scf_function" "foo" { handler = "first.do_it_first" runtime = "Python3.6" enable_public_net = true - - zip_file = "/scf/first.zip" + zip_file = "/scf/first.zip" triggers { name = "tf-test-fn-trigger" @@ -79,6 +78,18 @@ resource "tencentcloud_scf_function" "foo" { type = "cos" trigger_desc = "{\"event\":\"cos:ObjectCreated:Put\",\"filter\":{\"Prefix\":\"\",\"Suffix\":\"\"}}" } + + triggers { + name = "tf-test-fn-trigger" + type = "http" + trigger_desc = jsonencode({ + "AuthType" : "NONE", + "NetConfig" : { + "EnableIntranet" : true, + "EnableExtranet" : false, + } + }) + } } ``` diff --git a/website/docs/r/scf_function.html.markdown b/website/docs/r/scf_function.html.markdown index 9aa3963ab4..e872fe175b 100644 --- a/website/docs/r/scf_function.html.markdown +++ b/website/docs/r/scf_function.html.markdown @@ -34,13 +34,13 @@ resource "tencentcloud_scf_function" "foo" { runtime = "Python3.6" enable_public_net = true dns_cache = true + vpc_id = "vpc-391sv4w3" + subnet_id = "subnet-ljyn7h30" + zip_file = "/scf/first.zip" + intranet_config { ip_fixed = "ENABLE" } - vpc_id = "vpc-391sv4w3" - subnet_id = "subnet-ljyn7h30" - - zip_file = "/scf/first.zip" tags = { "env" = "test" @@ -75,8 +75,7 @@ resource "tencentcloud_scf_function" "foo" { handler = "first.do_it_first" runtime = "Python3.6" enable_public_net = true - - zip_file = "/scf/first.zip" + zip_file = "/scf/first.zip" triggers { name = "tf-test-fn-trigger" @@ -90,6 +89,18 @@ resource "tencentcloud_scf_function" "foo" { type = "cos" trigger_desc = "{\"event\":\"cos:ObjectCreated:Put\",\"filter\":{\"Prefix\":\"\",\"Suffix\":\"\"}}" } + + triggers { + name = "tf-test-fn-trigger" + type = "http" + trigger_desc = jsonencode({ + "AuthType" : "NONE", + "NetConfig" : { + "EnableIntranet" : true, + "EnableExtranet" : false, + } + }) + } } ```