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 2cb6c74 commit 5ba9f94
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 @@ -4,7 +4,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 5ba9f94

Please sign in to comment.