File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ module "alb" {
29
29
30
30
health_check = {
31
31
enabled = true
32
- path = " /health "
32
+ path = " /"
33
33
protocol = " HTTPS" # Customize this based on your needs
34
34
matcher = " 200-299" # HTTP status codes that indicate a healthy response
35
35
interval = 30 # Time in seconds between health checks
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ resource "aws_security_group" "database" {
53
53
cidr_blocks = [" 0.0.0.0/0" ]
54
54
# cidr_blocks = local.vpc.vpc_cidr
55
55
# security_groups = [aws_security_group.backend_asg.id]
56
+ security_groups = [aws_security_group . eb_instances . id ] # Restrict access to EB instances only
56
57
}
57
58
58
59
egress {
@@ -63,3 +64,26 @@ resource "aws_security_group" "database" {
63
64
}
64
65
tags = module. naming . resources . rds . tags
65
66
}
67
+
68
+
69
+
70
+ # ################################################
71
+ # EC2
72
+ # ################################################
73
+ resource "aws_security_group" "eb_instances" {
74
+ name = " eb-instances-sg"
75
+ description = " Security group for Elastic Beanstalk instances"
76
+ vpc_id = data. aws_vpc . adex_poc_default_vpc . id
77
+
78
+ # Allow outbound MySQL traffic to the RDS security group
79
+ egress {
80
+ from_port = 3306
81
+ to_port = 3306
82
+ protocol = " tcp"
83
+ security_groups = [aws_security_group . database . id ]
84
+ }
85
+
86
+ tags = {
87
+ Name = " EB Instances SG"
88
+ }
89
+ }
You can’t perform that action at this time.
0 commit comments