Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

non-recursive is not an option #1679

Open
anavrotski opened this issue Jun 14, 2024 · 2 comments
Open

non-recursive is not an option #1679

anavrotski opened this issue Jun 14, 2024 · 2 comments

Comments

@anavrotski
Copy link

  • terrascan version:
    latest
  • Operating System:
    mac os / linux

Description

All these issues:

are about the same problem - if you want to use terrascan, you should change your project structure. If some folders in your project are not containing terraform files, you'll get an error. That prevents me from using this tool in the CI pipeline and even in local checks.

Is there any plans to solve this issue ?

@jesusplanas
Copy link

Hi, we are facing the same problem. If we use the --non-recursive parameter we always get an error like:

| Running Terrascan in directory: ./workflow_tests/terraform/basic 
| 2024-06-27T08:09:53.282Z	error	cli/run.go:141	scan run failed{error 26 0  1 error occurred:
| 	* failed to build terraform allResourcesConfig
| 
| }

If we do not add the --non-recursive option also get an error like:

Running Terrascan in directory: ./workflow_tests/terraform/basic 


Scan Errors -

	IaC Type            :	terraform
	Directory           :	/home/runner/work/github-workflows/github-workflows/workflow_tests/terraform/basic
	Error Message       :	failed to build unified config. errors:
<nil>: Invalid module config directory; Module directory '/home/runner/work/github-workflows/github-workflows/workflow_tests' has no terraform config files for module naming

	
	-----------------------------------------------------------------------
	


Scan Summary -

	File/Folder         :	/home/runner/work/github-workflows/github-workflows/workflow_tests/terraform/basic
	IaC Type            :	terraform
	Scanned At          :	2024-06-27 08:14:29.561496867 +0000 UTC
	Policies Validated  :	174
	Violated Policies   :	0
	Low                 :	0
	Medium              :	0
	High                :	0
	

Error: Process completed with exit code 4.

This also prevents us to use the GH action or even the package installed in our local envs.

Terrascan version: v1.19.1

@EliiseS
Copy link

EliiseS commented Nov 14, 2024

Any updates on this?

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

No branches or pull requests

3 participants