Replies: 1 comment 5 replies
-
hi @ZsoltPath For the first issue, can you please supply a tfvars file so we can test it out? It looks like Trivy is unable to determine the value for the For your second issue: What does |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I have actually to similar issues around expansion.
Desired Behavior
Where
module.routing.private_route_table_ids
is a list of rout table IDs as the name suggests.For example in my current environment TF console shows
First the module call and then the actual relevant resource definition
Actual Behavior
Getting:
ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.private_tgw_route" value="cty.NilVal"
Getting:
ERROR [terraform evaluator] Failed to expand dynamic block. block="module.cleanup.aws_lambda_function.lambda" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.lambda.dynamic.environment block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
Interestingly twice.
Reproduction Steps
1. `trivy config --tf-vars environments/dev.tfvars ./`
Target
Filesystem
Scanner
Misconfiguration
Output Format
None
Mode
Standalone
Debug Output
There's nothing more in there. And it's a 153K file.
Operating System
MacOS Sequia
Version
Checklist
trivy clean --all
Beta Was this translation helpful? Give feedback.
All reactions