Skip to content

Commit 82373b4

Browse files
committed
sts_domain -> audience
1 parent 81fa23e commit 82373b4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

data.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ data "aws_iam_policy_document" "assume_role" {
3333
condition {
3434
test = "StringEquals"
3535
values = var.additional_audiences != null ? concat(
36-
[format("sts.%v", local.dns_suffix)],
36+
[local.audience],
3737
var.additional_audiences,
38-
) : [format("sts.%v", local.dns_suffix)]
38+
) : [local.audience]
3939
variable = "token.actions.githubusercontent.com:aud"
4040
}
4141

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
// limitations under the License.
1414

1515
locals {
16+
audience = format("sts.%v", local.dns_suffix)
1617
github_organizations = toset([
1718
for repo in var.github_repositories : split("/", repo)[0]
1819
])
1920
dns_suffix = data.aws_partition.current.dns_suffix
2021
oidc_provider_arn = var.enabled ? (var.create_oidc_provider ? aws_iam_openid_connect_provider.github[0].arn : data.aws_iam_openid_connect_provider.github[0].arn) : ""
2122
partition = data.aws_partition.current.partition
22-
sts_domain = format("sts.%v", local.dns_suffix)
2323
}
2424

2525
resource "aws_iam_role" "github" {
@@ -69,7 +69,7 @@ resource "aws_iam_openid_connect_provider" "github" {
6969

7070
client_id_list = concat(
7171
[for org in local.github_organizations : "https://github.com/${org}"],
72-
[local.sts_domain],
72+
[local.audience],
7373
)
7474

7575
tags = var.tags

0 commit comments

Comments
 (0)