Skip to content

Commit

Permalink
Move profiles_enabled logic out of providers.tf and into `iam-rol…
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored Jun 5, 2023
1 parent 6a566e2 commit 713bc5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ provider "aws" {
profile = module.iam_roles.profiles_enabled ? coalesce(var.import_profile_name, module.iam_roles.terraform_profile_name) : null

dynamic "assume_role" {
for_each = var.import_role_arn == null ? (module.iam_roles.terraform_role_arn != null ? [true] : []) : ["import"]
for_each = module.iam_roles.profiles_enabled ? [] : ["role"]
content {
role_arn = coalesce(var.import_role_arn, module.iam_roles.terraform_role_arn)
}
Expand Down

0 comments on commit 713bc5a

Please sign in to comment.