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
aws_resource_missing_tags
panics on unknown tags
#528
Comments
aws_resource_missing_tags
panics on unknown tags
This is not what the rule is intended to do and doesn't seem to be especially useful. The panic is a legit bug though, assuming it's reproducible in the latest version, and should be easily fixable. The proper handling here is to ignore expressions that are unknown, which includes variables with no set value or default. |
Hmm,
https://github.com/zclconf/go-cty/blob/v1.13.2/cty/value_ops.go#L1190-L1197 I'm surprised because this is different behavior from the documentation...
https://pkg.go.dev/github.com/zclconf/go-cty@v1.13.2/cty#Value.CanIterateElements |
Having this same error in every version after 24.1. 24.1 is fine but 24.2+ has the bug. |
Hi,
when enabling the
aws_resource_missing_tags
rule I get aFailed to check ruleset; error reading from server: EOF
error. This happens apparantly because we use variables for tags. Instead of "not checking" the rule breaks. Here's a simple test setup:Example
.tflint.hcl:
Debug output:
When removing/commenting that
test_var
I get a clean and normal message:I'd expect/hope that the rule can at least check IF the tags are configured, even without checking the specific tags. I've tried enforcing this by removing the tags to validate (assuming it would just do a "missing tags" check):
But this throws an error as well:
Failed to check ruleset; failed to check "aws_resource_missing_tags" rule: .tflint.hcl:12,34-34: Missing required argument; The argument "tags" is required, but no definition was found.
Changing to
tags = []
also doesn't work, just doesn't check anythingConclusion
Multiple ways to fix/support this I guess:
tags
from the rule configuration).The text was updated successfully, but these errors were encountered: