Skip to content

Commit 98ce893

Browse files
committed
allow a path on aws_iam_policy.task_exec
1 parent 3b70e1e commit 98ce893

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

modules/service/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -894,8 +894,8 @@ resource "aws_iam_policy" "task_exec" {
894894
name_prefix = var.task_exec_iam_role_use_name_prefix ? "${local.task_exec_iam_role_name}-" : null
895895
description = coalesce(var.task_exec_iam_role_description, "Task execution role IAM policy")
896896
policy = data.aws_iam_policy_document.task_exec[0].json
897-
898-
tags = merge(var.tags, var.task_exec_iam_role_tags)
897+
path = var.task_exec_iam_policy_path
898+
tags = merge(var.tags, var.task_exec_iam_role_tags)
899899
}
900900

901901
resource "aws_iam_role_policy_attachment" "task_exec" {

modules/service/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,12 @@ variable "task_exec_iam_statements" {
468468
default = {}
469469
}
470470

471+
variable "task_exec_iam_policy_path" {
472+
description = "Path for the iam role"
473+
type = string
474+
default = null
475+
}
476+
471477
################################################################################
472478
# Tasks - IAM role
473479
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html

0 commit comments

Comments
 (0)