I am looking for a terraform plugin for JQAssistant. So far I didn't found any. Is there a plugin available to analyze terraform code?
Asked
Active
Viewed 73 times
1 Answers
0
There is no native support by jQA for analysing Terraform code at the moment. But according to the Terraform documentation, it is possible to use JSON as representation format. And jQA supports parsing and analysing JSON via tha jQAssistant JSON Plugin. If you know a tool which is able to convert HCL into JSON, the language used for Terraform, you could try it this way.
As HCL is not so diffuclt, we could consider adding a HCL plugin to jQA.

Oliver
- 3,815
- 8
- 35
- 63
-
I added this as a feature request to our idea hub (https://github.com/jQAssistant/jqa-archivers-plugin/issues/2) – Oliver Jul 09 '20 at 15:51
-
1Sounds good. I already started [a project](https://github.com/kayman-mk/jqa-terraform/) to do this with an ANTLR4 parser. Input and Output variables are working. – Matthias Jul 09 '20 at 19:34
-
@Matthias That sounds interessting. I also used Antlr for the JSON plugin. If you have a working grammer and some examples, I would be happy to see them. I could also help you to write a plugin for jQA, if you are interessted. – Oliver Jul 09 '20 at 21:50
-
@Matthias is working on a plugin for jQA to analyse HCL files. The current repository for this plungin can be found at https://github.com/jqassistant-contrib/jqassistant-hcl-plugin. – Oliver Sep 10 '20 at 05:30