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([ {