Skip to content

Commit 37206c8

Browse files
authored
feat: Adding IAM PassRole for ECS tasks as it is required for Fargate (#24)
1 parent b5c52a6 commit 37206c8

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
55
<a name="unreleased"></a>
66
## [Unreleased]
77

8+
- feat: adding PassRole for ECS tasks as it is required for Fargate ([#24](https://github.com/terraform-aws-modules/terraform-aws-step-functions/issues/24))
89

910

1011
<a name="v2.4.0"></a>

locals.tf

+26
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,19 @@ locals {
250250
default_resources = ["*"]
251251
}
252252

253+
iam_PassRole = {
254+
actions = [
255+
"iam:PassRole"
256+
]
257+
condition = [
258+
{
259+
test = "StringEquals"
260+
variable = "iam:PassedToService"
261+
values = ["ecs-tasks.amazonaws.com"]
262+
}
263+
]
264+
}
265+
253266
events = {
254267
actions = [
255268
"events:PutTargets",
@@ -265,6 +278,19 @@ locals {
265278
"ecs:RunTask"
266279
]
267280
}
281+
282+
iam_PassRole = {
283+
actions = [
284+
"iam:PassRole"
285+
]
286+
condition = [
287+
{
288+
test = "StringEquals"
289+
variable = "iam:PassedToService"
290+
values = ["ecs-tasks.amazonaws.com"]
291+
}
292+
]
293+
}
268294
}
269295

270296
# https://docs.aws.amazon.com/step-functions/latest/dg/glue-iam.html

0 commit comments

Comments
 (0)