File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 22
33# Lambda security group
44resource "aws_security_group" "lambda_sg" {
5- name = " lambda-sg "
5+ name = " lambda-sg1 "
66 description = " Security group for Lambda functions"
77 vpc_id = aws_vpc. main . id # replace with your VPC resource
88
@@ -19,7 +19,7 @@ resource "aws_security_group" "lambda_sg" {
1919 from_port = 5432 # RDS PostgreSQL port
2020 to_port = 5432
2121 protocol = " tcp"
22- security_groups = [aws_security_group . rds_sg . id ] # allow Lambda → RDS
22+ security_groups = [aws_security_group . rds_sg1 . id ] # allow Lambda → RDS
2323 }
2424
2525 tags = {
@@ -29,15 +29,15 @@ resource "aws_security_group" "lambda_sg" {
2929
3030# RDS security group
3131resource "aws_security_group" "rds_sg" {
32- name = " rds-sg "
32+ name = " rds-sg1 "
3333 description = " Security group for RDS PostgreSQL"
3434 vpc_id = aws_vpc. main . id
3535
3636 ingress {
3737 from_port = 5432
3838 to_port = 5432
3939 protocol = " tcp"
40- security_groups = [aws_security_group . lambda_sg . id ] # allow Lambda → RDS
40+ security_groups = [aws_security_group . lambda_sg1 . id ] # allow Lambda → RDS
4141 }
4242
4343 egress {
You can’t perform that action at this time.
0 commit comments