Skip to content

Commit

Permalink
chore: change iam sa trust policy
Browse files Browse the repository at this point in the history
  • Loading branch information
xshot9011 committed Nov 25, 2023
1 parent 4e42ed6 commit 50a3ecf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/openid_connect_provider/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,14 @@ data "aws_iam_policy_document" "aws_sa_assume_role_policy" {
actions = ["sts:AssumeRoleWithWebIdentity"]
effect = "Allow"
condition {
test = "StringEquals"
test = "StringLike"
variable = "${replace(aws_iam_openid_connect_provider.this.url, "https://", "")}:sub"
values = [
format("system:serviceaccount:%s:%s", local.service_accounts[count.index].namespace, local.service_accounts[count.index].name)
]
}
condition {
test = "StringEquals"
test = "StringLike"
variable = "${replace(aws_iam_openid_connect_provider.this.url, "https://", "")}:aud"
values = [
"sts.amazonaws.com"
Expand Down

0 comments on commit 50a3ecf

Please sign in to comment.