Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/IAM role policy output #44

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Arzianghanchi
Copy link

@Arzianghanchi Arzianghanchi commented Feb 6, 2025

what

  • Uses aws_iam_role_policy.default[*].policy to safely handle conditional resources.
  • Returns an empty list instead of failing when no policy exists.
  • updated examples to demonstrate how to use AWS-managed policies effectively.

why

  • Splat expressions ([*]) gracefully handle empty resource collections created via count or for_each
  • Avoids index-based failures by treating the resource as a list (empty or populated)

references

@Arzianghanchi Arzianghanchi changed the title Fix/invalid index error for conditional IAM role policy output Fix/IAM role policy output Feb 12, 2025
@h1manshu98 h1manshu98 added bug Something isn't working enhancement New feature or request labels Feb 17, 2025
@h1manshu98 h1manshu98 mentioned this pull request Mar 6, 2025
@h1manshu98 h1manshu98 marked this pull request as draft March 6, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants