Skip to content
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

Terrascan Failure When Using Terraform 13 + Variable Validation #426

Closed
connorthomasmccabe opened this issue Dec 8, 2020 · 2 comments
Closed

Comments

@connorthomasmccabe
Copy link

  • terrascan version: 1.2.0
  • Operating System: OSX

Description

I am experimenting using this tool to implement static code analysis for Terraform in a CI/CD pipeline.

During my experiments, I have been having a lot of trouble getting my TF 13 modules to scan properly.

It seems as though Terrascan thinks variable validation is still an experimental feature, but it is GA in Terraform 13. Is Terrascan using my local terraform under the hood and possibly using the wrong path to the Terraform executable?

What I Did

Output of terrascan scan:

/path/to/my/module/variables.tf:20,3-13: Custom variable validation is experimental; This feature is currently an opt-in experiment, subject to change in future releases based on feedback.

Output of terrascan scan after adding the experimental block to my variables.tf file -

/path/to/my/module/variables.tf:2,18-37: Experimental feature "variable_validation" is active; Experimental features are subject to breaking changes in future minor or patch releases, based on feedback.

Block I added as a test

terraform {
  experiments = [variable_validation]
}
@connorthomasmccabe
Copy link
Author

So I found the IAC version, but when I try to use v13, it says it isn't supported - documentation says Terraform 12+ is supported - when is Terraform 13 support coming?

@connorthomasmccabe
Copy link
Author

Closing the issue - I see it is under enhancements - oh well - in the meantime the documentation should likely be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant