Skip to content

Commit

Permalink
[FEAT] add subnet group
Browse files Browse the repository at this point in the history
  • Loading branch information
ohksj77 committed Mar 16, 2024
1 parent 5e92864 commit 6f92213
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions terraform/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ resource "aws_security_group" "security-group-c" {
}
}

resource "aws_subnet_group" "twtw_subnet_group" {
name = "twtw-subnet-group"
subnet_ids = [aws_subnet.private-subnet-a.id, aws_subnet.private-subnet-c.id]

tags = {
Name = "TWTW subnet group"
}
}

resource "aws_db_instance" "db_instance" {
username = "admin"
timezone = "Asia/Seoul"
Expand All @@ -164,6 +173,7 @@ resource "aws_db_instance" "db_instance" {
engine = "mysql"
db_name = "TWTW"
availability_zone = "ap-northeast-2b"
db_subnet_group_name = aws_subnet_group.twtw_subnet_group.name
allocated_storage = 20
}

Expand Down

0 comments on commit 6f92213

Please sign in to comment.