Commit 7a1edaed authored by bsmedberg-xometry's avatar bsmedberg-xometry Committed by GitHub

fix: Allow modules/iam-assumable-role-with-oidc to work in govcloud (#83)

parent f0c037c4
...@@ -4,6 +4,8 @@ locals { ...@@ -4,6 +4,8 @@ locals {
data "aws_caller_identity" "current" {} data "aws_caller_identity" "current" {}
data "aws_partition" "current" {}
data "aws_iam_policy_document" "assume_role_with_oidc" { data "aws_iam_policy_document" "assume_role_with_oidc" {
count = var.create_role ? 1 : 0 count = var.create_role ? 1 : 0
...@@ -16,7 +18,7 @@ data "aws_iam_policy_document" "assume_role_with_oidc" { ...@@ -16,7 +18,7 @@ data "aws_iam_policy_document" "assume_role_with_oidc" {
type = "Federated" type = "Federated"
identifiers = [ identifiers = [
"arn:aws:iam::${local.aws_account_id}:oidc-provider/${var.provider_url}" "arn:${data.aws_partition.current.partition}:iam::${local.aws_account_id}:oidc-provider/${var.provider_url}"
] ]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment