Skip to content

Commit

Permalink
fix count
Browse files Browse the repository at this point in the history
  • Loading branch information
dmattia authored Jan 24, 2025
1 parent e4a38d6 commit a9bb464
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion execution_role.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ resource "aws_iam_role" "execution_role" {
}

resource "aws_iam_role_policy" "ecs_instance_role_policy" {
count = length(var.execution_role_arn) == 0 ? 1 : 0
name = "${var.name}-ecs-instance-role-policy"
role = aws_iam_role.execution_role.id
role = aws_iam_role.execution_role[0].name

policy = jsonencode({
Version = "2012-10-17"
Expand Down

0 comments on commit a9bb464

Please sign in to comment.