-
Notifications
You must be signed in to change notification settings - Fork 517
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
Skip No Terraform Config Files Error #1323
Comments
This error is here: It also appears here (non-recursive): The non-recursive version probably needs this error, otherwise it doesn't make sense - to scan a folder non-recursively and not find any files. However, in the recursive version, it is unreasonable to expect this. |
Update: thanks! did not see PR before. Hello, I'm a little confused by those links. Is there a way to change the behavior of the error? What do you recommend as next steps here @tolidano |
I opened a PR, see above. |
Any updated? |
@nbajaj-tenable is this project being maintained? What's happening? |
terrascan version: 1.14.0
Operating System: Linux (ubuntu 20.04)
Description: Hoping to have a flag to skip/ignore the error code regarding not having terraform config files within a directory. I am using Azure DevOps and because of the "4" error code, the pipeline does not proceed despite having no pressing violations/other errors. Still want to be able to pick up on other errors in configuration.
What I Did:
terrascan scan -t azure -i terraform --skip-rules="AC_AZURE_XXXX" --show-passed -v -o junit-xml > $(System.DefaultWorkingDirectory)/TerrascanReport/Terrascan-Report.xml
It was only when I passed the command through the console (no -o flag) that I saw the reason for the error: directory '/xxx/scripts' has no terraform config files
Desired Outcome: There are two situations where it would be helpful to have a flag to ignore the above error:
-directories that contain directories with and without terraform files (i.e. within /xxx there is a /xxx/scripts and /xxx/terraformfiles)
-directories that contain terraform files recursively (ie /modules/moduleA/terraformfiles currently gets an error because technically the moduleA directory is not a terraform file. All the files were scanned for violations but it still counted as an error).
Thank you.
The text was updated successfully, but these errors were encountered: