Skip to content

Commit

Permalink
ECS: Policy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dnillovna committed May 22, 2024
1 parent faa2140 commit 2e75606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1053,10 +1053,10 @@ resource "aws_iam_role" "grok_spawner_task" {
]))
}
},
"Resource" : [
"Resource" : distinct(compact([
"arn:aws:ecs:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:service/${module.ecs.cluster_name}/*",
try(length(var.grok_spawner_cvm_ecs_cluster) > 0, false) ? "arn:aws:ecs:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:service/${var.grok_spawner_cvm_ecs_cluster}/*" : ""
]
]))
},
{
"Effect" = "Allow",
Expand Down

0 comments on commit 2e75606

Please sign in to comment.