From 713bc5a80685365e81a581660bd8cb629afc4f36 Mon Sep 17 00:00:00 2001 From: Nuru Date: Sun, 4 Jun 2023 18:59:25 -0700 Subject: [PATCH] Move `profiles_enabled` logic out of `providers.tf` and into `iam-roles` (https://github.com/cloudposse/terraform-aws-components/pull/702) --- src/providers.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers.tf b/src/providers.tf index dd2b4a1..944bbdb 100644 --- a/src/providers.tf +++ b/src/providers.tf @@ -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) }