File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
terraform/modules/department Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1273,10 +1273,15 @@ data "aws_iam_policy_document" "department_ecs_passrole" {
12731273 actions = [
12741274 " iam:PassRole"
12751275 ]
1276- resources = [
1277- aws_iam_role . department_ecs_role . arn , # Defined in 50-aws-iam-roles.tf
1278- " arn:aws:iam::${ data . aws_caller_identity . current . account_id } :role/${ local . department_identifier } *-ecs-execution-role" , # Defined in ecs repo.
1279- ]
1276+ resources = concat (
1277+ [
1278+ aws_iam_role . department_ecs_role . arn , # Defined in 50-aws-iam-roles.tf
1279+ " arn:aws:iam::${ data . aws_caller_identity . current . account_id } :role/${ local . department_identifier } *-ecs-execution-role" , # Defined in ecs repo.
1280+ ],
1281+ local. department_identifier == " data-and-insight" ? [
1282+ " arn:aws:iam::${ data . aws_caller_identity . current . account_id } :role/datahub-task-execution-role" # Defined in dap-datahub repo
1283+ ] : []
1284+ )
12801285 condition {
12811286 test = " StringEquals"
12821287 variable = " iam:PassedToService"
You can’t perform that action at this time.
0 commit comments