You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ terrascan scan --iac-type terraform --log-level debug
2022-03-02T09:29:52.023Z debug commons/load-dir.go:146 failed to load terraform config dir '/path/to/terrascan-test'. error from terraform:
/path/to/terrascan-test/main.tf:6,3-11: Unsupported argument; An argument named "nullable" is not expected here.
The text was updated successfully, but these errors were encountered:
This is still a bug in v1.18.0. Looking at code in #1211 I can't see how it was related to this issue or #1182 - the issue is that valid terraform syntax isn't recognized, not that the message is imprecise
@davidjeddy this is actually the earliest mention of this bug, as far as I can find, but it is incorrectly closed by an unrelated fix. A few more duplicates are listed at the end of this comment: #1547 (comment)
I'm not sure if our team is still using terrascan and waiting for a fix at this point, or have replaced it with something else
Description
After adding
nullable = false
to a variable definition,terrascan
can no longer parse the file.See https://www.terraform.io/language/values/variables#disallowing-null-input-values for documentation of the field.
Here is a minimal example:
What I Did
Terraform validates OK:
The terrascan scan also appears to be successful:
However the process exited with code 4 (“scan summary has errors but no violations” – https://runterrascan.io/docs/usage/command_line_mode/):
Enabling debug logging shows the error:
The text was updated successfully, but these errors were encountered: