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

terraform_map_duplicate_keys: Temporarily ignore key evaluation errors #200

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

wata727
Copy link
Member

@wata727 wata727 commented Aug 3, 2024

Fixes #199

The terraform_map_duplicate_keys rule, added in v0.9.0, walks through all expressions and evaluates their values ​​to see if a map has duplicate keys.

In most cases, this approach works well because the evaluation scope is the same across the board, but expressions with different scopes, such as for expressions, cannot be evaluated correctly without first expanding the for expressions.

This issue should be resolved at the SDK level, but since it is currently it is not, we will mitigate this issue by temporarily ignoring key evaluation errors. Note that this may result in duplicate keys not being detected correctly when using for expressions.

@wata727 wata727 merged commit a3a19e5 into main Aug 3, 2024
2 checks passed
@wata727 wata727 deleted the ignore_key_eval_errors branch August 3, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

terraform_map_duplicate_keys: declaration in for expression fails to be processed
1 participant