Add tflint output to SQ

I try to add my tflint issues to sonarqube. According to the docs , I have to add the sonar.terraform.tfLint.reportPaths to the config.

But when I do something like
sonar-scanner -Dsonar.projectKey=test -Dsonar.terraform.tfLint.reportPaths=tflint.json
noting will appear in sonarqube.
When using the -X parameter, I dont see any reference to this functionality.

How can I get this working?

sonar-scanner version: 4.8.0.2856 (afiak the latest)
sonarqube server: 10.1

Hi @ericrichter,

Thank you for your report. I am trying to reproduce the problem and find the cause.
Stay tuned and thank you for your patience.

Best,
Nils

Hi @ericrichter ,

we identified that the issue was within the documentation, which is now fixed.

The appropriate flag to include terraform reports is:

-Dsonar.terraform.tflint.reportPaths=tflint.json

Please let us know if you are now able to import the report.
Thanks again for reporting this issue.

Best,
Jonas

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.