Skip to content

Commit b8ca90d

Browse files
authored
remove sg rule (#3519)
1 parent 80517ca commit b8ca90d

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

website/docs/index.html.markdown

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,25 @@ resource "tencentcloud_security_group" "default" {
6868
description = "make it accessible for both production and stage ports"
6969
}
7070
71-
# Create security group rule allow web request
72-
resource "tencentcloud_security_group_rule" "web" {
71+
# Create security group rule allow web and ssh request
72+
resource "tencentcloud_security_group_rule_set" "base" {
7373
security_group_id = tencentcloud_security_group.default.id
74-
type = "ingress"
75-
cidr_ip = "0.0.0.0/0"
76-
ip_protocol = "tcp"
77-
port_range = "80,8080"
78-
policy = "accept"
79-
}
8074
81-
# Create security group rule allow ssh request
82-
resource "tencentcloud_security_group_rule" "ssh" {
83-
security_group_id = tencentcloud_security_group.default.id
84-
type = "ingress"
85-
cidr_ip = "0.0.0.0/0"
86-
ip_protocol = "tcp"
87-
port_range = "22"
88-
policy = "accept"
75+
ingress {
76+
action = "ACCEPT"
77+
cidr_block = "0.0.0.0/0"
78+
protocol = "TCP"
79+
port = "80,8080"
80+
description = "Create security group rule allow web request"
81+
}
82+
83+
egress {
84+
action = "ACCEPT"
85+
cidr_block = "0.0.0.0/0"
86+
protocol = "TCP"
87+
port = "22"
88+
description = "Create security group rule allow ssh request"
89+
}
8990
}
9091
```
9192

0 commit comments

Comments
 (0)