Skip to content

Commit

Permalink
Adding ability to add additional principal to trusted policy
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-kirb committed Jun 4, 2024
1 parent 9af80d7 commit b26b1a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ data "aws_iam_policy_document" "mwaa_assume" {
type = "Service"
identifiers = ["s3.amazonaws.com"]
}
dynamic "principals" {
for_each = var.additional_principal_arns
content {
type = "AWS"
identifiers = [principals.value]
}
}
}
}
#tfsec:ignore:AWS099
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ variable "iam_role_name" {
default = null
}

variable "additional_principal_arns" {
description = "List of additional AWS principal ARNs"
type = list(string)
default = []
}

variable "iam_role_permissions_boundary" {
description = "IAM role Permission boundary"
type = string
Expand Down

0 comments on commit b26b1a9

Please sign in to comment.