Skip to content

Commit

Permalink
[FIX] terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
ohksj77 committed Mar 16, 2024
1 parent e4b3ec2 commit 35879f0
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions terraform/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ resource "aws_subnet" "public-subnet-c" {
availability_zone = "ap-northeast-2b"
}

resource "aws_internet_gateway" "igw" {
vpc_id = aws_vpc.vpc_network.id
}

resource "aws_route_table" "r" {
vpc_id = aws_vpc.vpc_network.id

route {
cidr_block = "0.0.0.0/0"
gateway_id = aws_internet_gateway.igw.id
}
}

resource "aws_route_table_association" "a" {
subnet_id = aws_subnet.public-subnet-c.id
route_table_id = aws_route_table.r.id
}

resource "aws_elb" "elb" {
tags = merge(var.tags, {})
cross_zone_load_balancing = true
Expand Down Expand Up @@ -142,7 +160,7 @@ resource "aws_db_instance" "db_instance" {
tags = merge(var.tags, {})
port = 3306
password = var.db_password
instance_class = "db.md5.large"
instance_class = "db.m5d.large"
engine = "mysql"
db_name = "TWTW"
availability_zone = "ap-northeast-2b"
Expand All @@ -164,7 +182,6 @@ resource "aws_mq_broker" "mq_broker" {

subnet_ids = [
aws_subnet.private-subnet-a.id,
aws_subnet.private-subnet-c.id,
]

security_groups = [
Expand Down

0 comments on commit 35879f0

Please sign in to comment.