Skip to content

Commit 7b80128

Browse files
committed
fix: RDS db name 추가
1 parent ffbd503 commit 7b80128

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

terraform/prod/locals.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ locals {
7979
}
8080

8181
locals {
82+
db_name = "eatda"
8283
allocated_storage = 20
8384
identifier = "${local.project_name}-${local.environment}-db"
8485
instance_class = "db.t3.micro"

terraform/prod/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module "rds" {
3737
engine = local.engine
3838
engine_version = local.engine_version
3939
allocated_storage = local.allocated_storage
40+
db_name = local.db_name
4041
username = data.aws_ssm_parameter.rds_user_name.value
4142
password = data.aws_ssm_parameter.rds_password.value
4243
vpc_security_group_ids = local.vpc_security_group_ids

terraform/prod/rds/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ resource "aws_db_instance" "prod" {
5050
engine_version = var.engine_version
5151
instance_class = var.instance_class
5252
allocated_storage = var.allocated_storage
53+
db_name = var.db_name
5354
username = random_pet.rds_user_name.id
5455
password = random_password.rds_password.result
5556
vpc_security_group_ids = var.vpc_security_group_ids

terraform/prod/rds/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ variable "allocated_storage" {
3838
type = number
3939
}
4040

41+
variable "db_name" {
42+
type = string
43+
}
44+
4145
variable "username" {
4246
description = "Master username"
4347
type = string

0 commit comments

Comments
 (0)