-
Notifications
You must be signed in to change notification settings - Fork 72
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
Rule aws_s3_bucket_name does work on module parameters #194
Comments
Hmm, the correct behavior would be the reverse. TFLint's module feature is meant to raise errors caused by the supplied variables in a call, not to check the static content of the module itself. |
Confirmed this is not an issue with that rule. It evaluates the variable and the logic is correct. This is a bug with TFLint's propagation of issues from modules. Issues should only be propagated when their expression references a module variable: This logic is not working correctly for plugins. Will need to spend more time debugging to find a fix. |
This is a bug in the rule. In order to propagate the issue and expression associations to the host, the plugin must use the appropriate API. The In this case, the rule should use |
I have the following in place:
tflint-config:
Terrafrom "main-module":
The used Terraform-module:
When I now run "tflint" within the "main-modules"-directory I don't get any error even though the rule for "aws_s3_bucket_name" should produce an error as the value for "bucket_name" does not match die regex and the prefix of the rule. Changing "bucket" from within the module from "bucket = var.bucket_name" to something like "bucket = "foobar"" results in getting the expected error-message as the bucket-name does not adhere to the rule(s).
Version
The text was updated successfully, but these errors were encountered: