-
Notifications
You must be signed in to change notification settings - Fork 503
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 not able to find terraform config files in a sub directory, but it works in case of k8s infrastructure type #622
Comments
Hi @Saini01Basu, Thank you for trying out You are correct in your analysis that But for Also, there is an open issue for this #411 Hope this helps! |
This helps @kanchwala-yusuf :) we are considering another scan tool called checkov which is able to produce a collated result for terraform as well. So I was wondering if this feature can be added in terrascan? |
Hi @Saini01Basu, we have implemented sub folder scanning feature for terraform as well. Can you please try it out and let us know if you face any issue? |
Hi @Saini01Basu, the changes for terraform sub folder scanning are available in |
Sure thanks for the info will definitely try it out |
It worked thanks a lot for adding this feature |
Thanks for trying it out @Saini01Basu. I will close this issue. |
Hey but noticed that for this project - https://github.com/bridgecrewio/terragoat/tree/master/terraform it only scanned aws recursively not the gcp and azure |
I didn't add any -t option so default is "all" right? so it should have scanned gcp and azure as well right? |
Yes @Saini01Basu, by default directory will be scanned with all policies. I will have a look and reply back. |
Hey, I tried out the repository shared by you with below command:
All folders were scanned, see below output:
|
I am sorry my bad i got confused with three goat projects that I am using for testing. Yes it is working in all scenarios. Thanks again and sorry about the confusion |
i need to scan recursively and dont want these error messages like 'error 26 0 directory 'C:\Users\saini_basu\Documents\terragoat\terraform' has no terraform config files ' is there any way i can recursively run it ? |
I have to agree. Why are subfolders without terraform config files considered scan errors? |
Description
I have cloned a publicly available terragoat project which has terraform config files for aws, gcp and azure. I wanted to get a collated scan report for all config files. The config files are placed under /terraform/aws, /terraform/gcp, /terraform/azure.
It is not able to scan all config files at once but individually it works.
What I Did
I ran the command - terrascan scan -d ./terraform -t all
It throws error - cli/run.go:101 scan run failed{error 26 0 directory 'C:\Users\saini_basu\Documents\terragoat\terraform' has no terraform config files}
The text was updated successfully, but these errors were encountered: