bug(terraform): module output values are not passed into the context of other modules #6274
Closed
2 tasks done
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
I found the following problem:
Currently, module results are only propagated to the context of the parent module (i.e., the one that calls), and are not propagated to the context of other modules. In the example below, the
module.artifactory_key.key_arn
output value of theartifactory_key
module is missing in the context of theartifactory_bucket
module.UPD: output variables of one module are not present in the context of another module only during module evaluation and block expanding (dynamic, for-each).
Discussed in #5262
Originally posted by natebowang September 28, 2023
IDs
AVD-AWS-0088
Description
Hi, We use terraform KMS module terraform-aws-modules/kms/aws v2.0.1 and S3 module terraform-aws-modules/s3-bucket/aws v3.15.1 in our configuration, but Trivy scan fails with the error we don't expect to see
Reproduction Steps
Target
Filesystem
Scanner
Misconfiguration
Target OS
5.4.254-1-MANJARO
Debug Output
Version
Checklist
-f json
that shows data sources and confirmed that the security advisory in data sources was correctThe text was updated successfully, but these errors were encountered: