Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MESG-2877 add sourceAccount condition to trust policy #4

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
MESG-2877 add sourceAccount condition to trust policy
  • Loading branch information
NikolayMetchev committed Sep 19, 2024
commit 0510bf08971d088e58f730b60b77805b823fea01
6 changes: 6 additions & 0 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ data "aws_iam_policy_document" "assume_role" {
variable = "aws:SourceArn"
values = var.trusted_entities_assume_role_source_arns
}

condition {
test = "ForAnyValue:StringEquals"
variable = "aws:SourceAccount"
values = [data.aws_caller_identity.current.account_id]
}
}

dynamic "statement" {
Expand Down