File tree 1 file changed +34
-0
lines changed
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -28,5 +28,39 @@ module "alb_sg" {
28
28
ingress_rules = [" http-80-tcp" ]
29
29
ingress_cidr_blocks = [" 0.0.0.0/0" ]
30
30
31
+ egress_rules = [" all-all" ]
32
+ }
33
+
34
+ module "rds_sg" {
35
+ source = " terraform-aws-modules/security-group/aws"
36
+ version = " ~> 5.0"
37
+
38
+ name = " rds-sg"
39
+ description = " A RDS security group"
40
+ vpc_id = module. vpc . vpc_id
41
+
42
+ ingress_with_cidr_blocks = [
43
+ {
44
+ from_port = tonumber (var. rds_port )
45
+ to_port = tonumber (var. rds_port )
46
+ protocol = " tcp"
47
+ cidr_blocks = " 0.0.0.0/0"
48
+ },
49
+ ]
50
+
51
+ egress_rules = [" all-all" ]
52
+ }
53
+
54
+ module "ec2_sg" {
55
+ source = " terraform-aws-modules/security-group/aws"
56
+ version = " ~> 5.0"
57
+
58
+ name = " ec2-sg"
59
+ description = " A EC2 security group"
60
+ vpc_id = module. vpc . vpc_id
61
+
62
+ ingress_rules = [" http-80-tcp" ]
63
+ ingress_cidr_blocks = [" 0.0.0.0/0" ]
64
+
31
65
egress_rules = [" all-all" ]
32
66
}
You can’t perform that action at this time.
0 commit comments