-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup VPC and RDS Proxy to enable Lambda to connect to DB
- Loading branch information
1 parent
7b5bfa5
commit e2dd31d
Showing
5 changed files
with
221 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
output "ecr_repository_url" { | ||
value = aws_ecr_repository.ecr_repository.repository_url | ||
output "lambda_security_group" { | ||
description = "security group to be assigned to lambda function" | ||
value = aws_security_group.lambda_sg.id | ||
} | ||
|
||
output "db_endpoint" { | ||
value = aws_db_instance.fastapi-db.endpoint | ||
output "lambda_subnet_1" { | ||
value = aws_subnet.lambda_subnet[0].id | ||
} | ||
|
||
output "db_master_user_secret" { | ||
value = aws_db_instance.fastapi-db.master_user_secret | ||
} | ||
output "lambda_subnet_2" { | ||
value = aws_subnet.lambda_subnet[1].id | ||
} | ||
|
||
output "lambda_db_username" { | ||
value = var.lambda_db_username | ||
} | ||
|
||
output "rds_db_name" { | ||
value = aws_db_instance.fastapi_db.db_name | ||
} | ||
|
||
output "rds_proxy_endpoint" { | ||
value = aws_db_proxy.db_proxy.endpoint | ||
} | ||
|
||
output "rds_proxy_secret_arn" { | ||
value = aws_secretsmanager_secret.db_proxy_secret.arn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters