Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use static ARNs in attached_policies to avoid for_each unknown v…
…alue error
Terraform cannot use compute-time resource ARNs (aws_iam_policy.*.arn) as
for_each set keys since they are unknown at plan time. Replace with statically
constructed ARNs using locals that are always known at plan time:
format("arn:%v:iam::%v:policy/%v", local.partition, local.account_id, local.<name>)
Fixes 'Invalid for_each argument' errors on all three role modules.- Loading branch information