From dbff006bac9b2e3a070da072f7fbaeabb2097f83 Mon Sep 17 00:00:00 2001 From: Alvin Date: Wed, 12 Jun 2024 10:54:34 +0300 Subject: [PATCH] [pipeline update] --- .github/workflows/aws.yml | 4 ++-- modules/ecs/main.tf | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aws.yml b/.github/workflows/aws.yml index ffad00e..2b0560f 100644 --- a/.github/workflows/aws.yml +++ b/.github/workflows/aws.yml @@ -37,8 +37,8 @@ env: DOCKER_REPOSITORY: alvin254/fitnesshero # set this to your Docker Hub repository name ECS_SERVICE: app-service # set this to your Amazon ECS service name ECS_CLUSTER: cloudific # set this to your Amazon ECS cluster name - ECS_TASK_DEFINITION: MY_ECS_TASK_DEFINITION # set this to the path to your Amazon ECS task definition file - CONTAINER_NAME: MY_CONTAINER_NAME # set this to the name of the container in your task definition + ECS_TASK_DEFINITION: modules/ecs/container_definitions.json # set this to the path to your Amazon ECS task definition file + CONTAINER_NAME: app # set this to the name of the container in your task definition permissions: contents: read diff --git a/modules/ecs/main.tf b/modules/ecs/main.tf index 8e7d9d1..ba706df 100644 --- a/modules/ecs/main.tf +++ b/modules/ecs/main.tf @@ -36,6 +36,7 @@ resource "aws_iam_role_policy_attachment" "ecs_cloudwatch_logs_policy" { role = aws_iam_role.ecs_exec_role.name policy_arn = "arn:aws:iam::aws:policy/CloudWatchLogsFullAccess" } + locals { container_definitions = jsonencode([ {