From 25396c743a7d09dfdd22c54e3dd2c5180a366bcd Mon Sep 17 00:00:00 2001 From: Rohith Jayawardene Date: Sat, 23 Mar 2024 09:26:56 +0000 Subject: [PATCH] fix: the for_each on the customer managed references needed to be adjusted --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 54b9372..3d6d8de 100644 --- a/main.tf +++ b/main.tf @@ -24,7 +24,7 @@ resource "aws_ssoadmin_managed_policy_attachment" "managed" { ## Attach any customer managed policies to the permissionset # resource "aws_ssoadmin_customer_managed_policy_attachment" "customer" { - for_each = toset(var.customer_managed_policy_references) + for_each = { for x in var.customer_managed_policy_references : x.name => x } instance_arn = var.instance_arn permission_set_arn = aws_ssoadmin_permission_set.this.arn @@ -53,7 +53,7 @@ resource "aws_ssoadmin_permissions_boundary_attachment" "managed" { ## Attach any customer managed boundary policy to the permissionset # resource "aws_ssoadmin_permissions_boundary_attachment" "customer" { - for_each = toset(var.customer_managed_boundary_policy_references) + for_each = { for x in var.customer_managed_boundary_policy_references : x.name => x } instance_arn = var.instance_arn permission_set_arn = aws_ssoadmin_permission_set.this.arn