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

Add a note for CanIterateElements about unknown and null #166

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wata727
Copy link

@wata727 wata727 commented Aug 7, 2023

See also terraform-linters/tflint-ruleset-aws#517 (comment)
See also terraform-linters/tflint-ruleset-aws#528 (comment)

The documentation for CanIterateElements says "return true if the receiver can support the ElementIterator method without panic", but it actually causes panic if unknown or null.

One way would be to fix the implementation to match the documentation, but that would probably be too much of an impact. This PR fixes the documentation to match the implementation and avoid making the same mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant