We are looking to extend our static analysis toolset to automatically scan Terraform code during our pipelines within Gitlab CI.
I have terrascan running from the pipeline successfully but have come across an issue which will stop us adopting it and wonder if anyone can help.
We make use of the Terraform Cloud private module registry, so have to authenticate with a Token to run Terraform from Gitlab CI normally. When we run terrascan we get the following error for each module.
2021-03-26T12:36:19.449Z error downloader/module-download.go:113 error while fetching available modules for module: app.terraform.io/redacted/module/path, at registry: app.terraform.io
For Terraform itself we write a token into the $HOME/.terraformrc file and this is used. Is there a similar option to specify the token for terrascan?
Thanks in advance,