Skip to content

Commit

Permalink
[FIX] apply proper terraform setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ohksj77 committed Mar 16, 2024
1 parent 22f19e5 commit 5c86dc0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/backend-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- master
paths:
- '.github/workflows/backend-cd.yml'
- '**.tf'
workflow_run:
branches:
- "master"
Expand Down
13 changes: 7 additions & 6 deletions terraform/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ resource "aws_elb" "elb" {
tags = merge(var.tags, {})
cross_zone_load_balancing = true

availability_zones = [
"ap-northeast-2a",
"ap-northeast-2b",
]

listener {
lb_protocol = var.elb_protocol[0]
lb_port = var.elb_port[0]
Expand Down Expand Up @@ -147,7 +142,7 @@ resource "aws_db_instance" "db_instance" {
tags = merge(var.tags, {})
port = 3306
password = var.db_password
instance_class = "db.m1.micro"
instance_class = "db.md5.large"
engine = "mysql"
db_name = "TWTW"
availability_zone = "ap-northeast-2b"
Expand All @@ -160,12 +155,18 @@ resource "aws_mq_broker" "mq_broker" {
engine_version = "3.8.6"
host_instance_type = "mq.t3.micro"
broker_name = "rabbitmq"
publicly_accessible = false

user {
username = var.rabbitmq.username
password = var.rabbitmq.password
}

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

security_groups = [
aws_security_group.security-group-a.id,
aws_security_group.security-group-c.id
Expand Down

0 comments on commit 5c86dc0

Please sign in to comment.