Skip to content

Commit b51a1ff

Browse files
authored
fix(vpc): [123456789] tencentcloud_security_groups update doc (#3117)
* add * add
1 parent 5955970 commit b51a1ff

File tree

3 files changed

+51
-4
lines changed

3 files changed

+51
-4
lines changed

.changelog/3117.txt

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

tencentcloud/services/vpc/data_source_tc_security_groups.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,30 @@ Use this data source to query detailed information of security groups.
22

33
Example Usage
44

5+
Query all security groups
6+
57
```hcl
6-
data "tencentcloud_security_groups" "sglab" {
7-
security_group_id = tencentcloud_security_group.sglab.id
8+
data "tencentcloud_security_groups" "example" {}
9+
```
10+
11+
Query security groups by filter
12+
13+
```hcl
14+
data "tencentcloud_security_groups" "example" {
15+
security_group_id = "sg-e699atb7"
16+
}
17+
18+
data "tencentcloud_security_groups" "example" {
19+
name = "tf-example"
20+
}
21+
22+
data "tencentcloud_security_groups" "example" {
23+
project_id = 0
24+
}
25+
26+
data "tencentcloud_security_groups" "example" {
27+
tags = {
28+
createBy = "Terraform"
29+
}
830
}
931
```

website/docs/d/security_groups.html.markdown

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,31 @@ Use this data source to query detailed information of security groups.
1313

1414
## Example Usage
1515

16+
### Query all security groups
17+
18+
```hcl
19+
data "tencentcloud_security_groups" "example" {}
20+
```
21+
22+
### Query security groups by filter
23+
1624
```hcl
17-
data "tencentcloud_security_groups" "sglab" {
18-
security_group_id = tencentcloud_security_group.sglab.id
25+
data "tencentcloud_security_groups" "example" {
26+
security_group_id = "sg-e699atb7"
27+
}
28+
29+
data "tencentcloud_security_groups" "example" {
30+
name = "tf-example"
31+
}
32+
33+
data "tencentcloud_security_groups" "example" {
34+
project_id = 0
35+
}
36+
37+
data "tencentcloud_security_groups" "example" {
38+
tags = {
39+
createBy = "Terraform"
40+
}
1941
}
2042
```
2143

0 commit comments

Comments
 (0)