Skip to content

Commit

Permalink
use caller identity again
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jul 30, 2024
1 parent cac77a6 commit 558d586
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dns_zones.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ locals {
account_environment = data.aws_arn.current.partition == "aws-us-gov" ? "gov" : "ew"
region_short = join("", [for c in split("-", var.region) : substr(c, 0, 1)])
zone_ids = compact(var.zone_ids)
aws_account_id = var.account_id
}
#-------------------------------------------------
# Providers for Cross Account DNS Action
Expand All @@ -33,7 +32,7 @@ provider "aws" {
provider "aws" {
alias = "self"
assume_role {
role_arn = format("arn:%v:iam::%v:role/r-inf-terraform", data.aws_arn.current.partition, local.aws_account_id)
role_arn = format("arn:%v:iam::%v:role/r-inf-terraform", data.aws_arn.current.partition, data.aws_caller_identity.current.account_id)
session_name = var.os_username
}
}
Expand Down

0 comments on commit 558d586

Please sign in to comment.