Skip to content

Commit

Permalink
Merge pull request #3 from ab180/add-options
Browse files Browse the repository at this point in the history
fix: attach role policy to both task and execution
  • Loading branch information
holyachon authored Jun 26, 2023
2 parents f4e4039 + 2a4976b commit f7a4218
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ resource "aws_iam_role_policy" "user_defined" {
policy = var.task_role_policy_document
}

resource "aws_iam_role_policy" "user_defined_execution" {
count = var.task_role_policy_document != "" ? 1 : 0

name = "${var.name_prefix}-user-defined-execution"
role = aws_iam_role.execution.id
policy = var.task_role_policy_document
}

#####
# IAM - Task role, basic. Append policies to this role for S3, DynamoDB etc.
#####
Expand Down

0 comments on commit f7a4218

Please sign in to comment.