Skip to content

Commit 69093bc

Browse files
authored
fix(scf): [120516367] Update tencentcloud_scf_function doc (#2945)
* add * add
1 parent 2ec6a24 commit 69093bc

File tree

3 files changed

+43
-18
lines changed

3 files changed

+43
-18
lines changed

.changelog/2945.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_scf_function: Update doc
3+
```

tencentcloud/services/scf/resource_tc_scf_function.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ resource "tencentcloud_scf_function" "foo" {
2323
runtime = "Python3.6"
2424
enable_public_net = true
2525
dns_cache = true
26+
vpc_id = "vpc-391sv4w3"
27+
subnet_id = "subnet-ljyn7h30"
28+
zip_file = "/scf/first.zip"
29+
2630
intranet_config {
2731
ip_fixed = "ENABLE"
2832
}
29-
vpc_id = "vpc-391sv4w3"
30-
subnet_id = "subnet-ljyn7h30"
31-
32-
zip_file = "/scf/first.zip"
3333
3434
tags = {
3535
"env" = "test"
@@ -46,12 +46,12 @@ resource "tencentcloud_scf_function" "foo" {
4646
runtime = "Python3.6"
4747
4848
cfs_config {
49-
user_id = "10000"
50-
user_group_id = "10000"
51-
cfs_id = "cfs-xxxxxxxx"
52-
mount_ins_id = "cfs-xxxxxxxx"
53-
local_mount_dir = "/mnt"
54-
remote_mount_dir = "/"
49+
user_id = "10000"
50+
user_group_id = "10000"
51+
cfs_id = "cfs-xxxxxxxx"
52+
mount_ins_id = "cfs-xxxxxxxx"
53+
local_mount_dir = "/mnt"
54+
remote_mount_dir = "/"
5555
}
5656
}
5757
```
@@ -64,8 +64,7 @@ resource "tencentcloud_scf_function" "foo" {
6464
handler = "first.do_it_first"
6565
runtime = "Python3.6"
6666
enable_public_net = true
67-
68-
zip_file = "/scf/first.zip"
67+
zip_file = "/scf/first.zip"
6968
7069
triggers {
7170
name = "tf-test-fn-trigger"
@@ -79,6 +78,18 @@ resource "tencentcloud_scf_function" "foo" {
7978
type = "cos"
8079
trigger_desc = "{\"event\":\"cos:ObjectCreated:Put\",\"filter\":{\"Prefix\":\"\",\"Suffix\":\"\"}}"
8180
}
81+
82+
triggers {
83+
name = "tf-test-fn-trigger"
84+
type = "http"
85+
trigger_desc = jsonencode({
86+
"AuthType" : "NONE",
87+
"NetConfig" : {
88+
"EnableIntranet" : true,
89+
"EnableExtranet" : false,
90+
}
91+
})
92+
}
8293
}
8394
```
8495

website/docs/r/scf_function.html.markdown

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ resource "tencentcloud_scf_function" "foo" {
3434
runtime = "Python3.6"
3535
enable_public_net = true
3636
dns_cache = true
37+
vpc_id = "vpc-391sv4w3"
38+
subnet_id = "subnet-ljyn7h30"
39+
zip_file = "/scf/first.zip"
40+
3741
intranet_config {
3842
ip_fixed = "ENABLE"
3943
}
40-
vpc_id = "vpc-391sv4w3"
41-
subnet_id = "subnet-ljyn7h30"
42-
43-
zip_file = "/scf/first.zip"
4444
4545
tags = {
4646
"env" = "test"
@@ -75,8 +75,7 @@ resource "tencentcloud_scf_function" "foo" {
7575
handler = "first.do_it_first"
7676
runtime = "Python3.6"
7777
enable_public_net = true
78-
79-
zip_file = "/scf/first.zip"
78+
zip_file = "/scf/first.zip"
8079
8180
triggers {
8281
name = "tf-test-fn-trigger"
@@ -90,6 +89,18 @@ resource "tencentcloud_scf_function" "foo" {
9089
type = "cos"
9190
trigger_desc = "{\"event\":\"cos:ObjectCreated:Put\",\"filter\":{\"Prefix\":\"\",\"Suffix\":\"\"}}"
9291
}
92+
93+
triggers {
94+
name = "tf-test-fn-trigger"
95+
type = "http"
96+
trigger_desc = jsonencode({
97+
"AuthType" : "NONE",
98+
"NetConfig" : {
99+
"EnableIntranet" : true,
100+
"EnableExtranet" : false,
101+
}
102+
})
103+
}
93104
}
94105
```
95106

0 commit comments

Comments
 (0)