Skip to content

Commit

Permalink
Resolves inability to assume roles across accounts. (Ref: <https://gi…
Browse files Browse the repository at this point in the history
  • Loading branch information
jufemaiz committed Aug 9, 2019
1 parent 44cd2f0 commit c7102f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## v0.1.2 (2019-08-09)

* Resolves inability to assume roles across accounts.
(Ref: <https://github.com/ace-teknologi/terraform-iam/issues/17>)

## v0.1.1 (2019-08-08)

* Resolves incorrect repo path in taggings.tf.
Expand Down
4 changes: 2 additions & 2 deletions roles/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ data aws_caller_identity "current" {}

locals {
authorised_account_ids = (length(var.authorised_account_ids) == 0 ?
var.authorised_account_ids :
[data.aws_caller_identity.current.account_id])
[data.aws_caller_identity.current.account_id] :
var.authorised_account_ids)
authorised_account_root_arns = formatlist("arn:aws:iam::%s:root", local.authorised_account_ids)
}

Expand Down

0 comments on commit c7102f3

Please sign in to comment.