Skip to content

Commit

Permalink
feat: added aud:sts.amazonaws.com
Browse files Browse the repository at this point in the history
  • Loading branch information
JianLi-Expedia committed May 14, 2024
1 parent 0e49197 commit 234f627
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ resource "aws_iam_role" "apiary_hms_readonly" {
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"${var.oidc_provider}:sub": "system:serviceaccount:${var.metastore_namespace}:${local.hms_alias}-readonly"
"${var.oidc_provider}:sub": "system:serviceaccount:${var.metastore_namespace}:${local.hms_alias}-readonly",
"${var.oidc_provider}:aud": "sts.amazonaws.com"
}
}
},
Expand Down Expand Up @@ -109,7 +110,8 @@ resource "aws_iam_role" "apiary_hms_readwrite" {
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"${var.oidc_provider}:sub": "system:serviceaccount:${var.metastore_namespace}:${local.hms_alias}-readwrite"
"${var.oidc_provider}:sub": "system:serviceaccount:${var.metastore_namespace}:${local.hms_alias}-readwrite",
"${var.oidc_provider}:aud": "sts.amazonaws.com"
}
}
},
Expand Down Expand Up @@ -159,7 +161,8 @@ resource "aws_iam_role" "apiary_s3_inventory" {
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"${var.oidc_provider}:sub": "system:serviceaccount:${var.metastore_namespace}:${local.instance_alias}-s3-inventory"
"${var.oidc_provider}:sub": "system:serviceaccount:${var.metastore_namespace}:${local.instance_alias}-s3-inventory",
"${var.oidc_provider}:aud": "sts.amazonaws.com"
}
}
},
Expand Down

0 comments on commit 234f627

Please sign in to comment.