Closed s1rc closed 6 months ago
we already provide a conditional creation variable create_role
which can be used to toggle resource creation on/off
I'm going to lock this issue because it has been closed for 30 days β³. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
Using a count attribute/input even if it is
count = 1
causes referencingiam-role-for-service-accounts-eks
module resource error:Can't access attributes on a list of objects. Did you mean to access attribute "iam_role_arn" for a specific element of the list, or across all elements of the list?
The purpose of the count in this implementation is to enable deployment of this IRSA and accompanying resources based on a variable, e.g. deploy in a staging environment but not production
Versions
5.34.0
1.7.3
5.3.6
Reproduction Code [Required]
module.eks.oidc_provider_arn
is a currently deployed EKS clusterSteps to reproduce the behavior:
iam-role-for-service-accounts-eks
moduleterraform plan
Expected behavior
Actual behavior
module.test_irsa.iam_role_arn
results in terraform error: Can't access attributes on a list of objects. Did you mean to access attribute "iam_role_arn" for a specific element of the list, or across all elements of the list?