File tree Expand file tree Collapse file tree 1 file changed +17
-16
lines changed Expand file tree Collapse file tree 1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -68,24 +68,25 @@ resource "tencentcloud_security_group" "default" {
68
68
description = "make it accessible for both production and stage ports"
69
69
}
70
70
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 " {
73
73
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
- }
80
74
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
+ }
89
90
}
90
91
```
91
92
You can’t perform that action at this time.
0 commit comments