Skip to content

Commit

Permalink
fix(infra): fix tf apply command (#1817)
Browse files Browse the repository at this point in the history
fix: fix tf apply command
  • Loading branch information
k1g99 authored Jul 15, 2024
1 parent 663f04e commit 897a604
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd-prod-target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Terraform Apply
working-directory: ./apps/infra/production/${{ github.event.inputs.terraform_project }}
run: terraform apply plan.out -input=false
run: terraform apply -input=false plan.out

deploy-terraform-codedang:
name: Deploy Terraform Codedang Project
Expand Down Expand Up @@ -100,4 +100,4 @@ jobs:

- name: Terraform Apply
working-directory: ./apps/infra/production/codedang
run: terraform apply plan.out -input=false
run: terraform apply -input=false plan.out
2 changes: 1 addition & 1 deletion .github/workflows/cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ jobs:

- name: Terraform Apply
working-directory: ./apps/infra/production/codedang
run: terraform apply plan.out -input=false
run: terraform apply -input=false plan.out
5 changes: 4 additions & 1 deletion apps/infra/production/codedang/iam_ecs_instance_role.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ data "aws_iam_policy_document" "ec2_assume_role" {

resource "aws_iam_role" "ecs_container_instance_role" {
name = "Codedang-ECS-Container-Instance-Role"
description = "ECS가 EC2 인스턴스를 등록할 수 있는 권한"
assume_role_policy = data.aws_iam_policy_document.ec2_assume_role.json

tags = {
Description = "ECS가 EC2 인스턴스를 등록할 수 있는 권한"
}
}

resource "aws_iam_role_policy_attachment" "ecs_container_instance_role" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ data "aws_iam_policy_document" "task_assume_role" {

resource "aws_iam_role" "ecs_task_execution_role" {
name = "Codedang-Api-Task-Execution-Role"
description = "ECS agent가 작업을 실행하고 관리할 때 사용하는 권한"
assume_role_policy = data.aws_iam_policy_document.task_assume_role.json

tags = {
Description = "ECS agent가 작업을 실행하고 관리할 때 사용하는 권한"
}
}

resource "aws_iam_role_policy_attachment" "ecs_task_execution_role" {
Expand Down

0 comments on commit 897a604

Please sign in to comment.