Hello Alloy Team,
I am currently using Alloy tools for configuration management and I’ve encountered some issues regarding HCL (HashiCorp Configuration Language) file parsing. I am not sure which version of HCL is supported by the tools I am using, and I need some guidance to ensure compatibility and proper functionality.
Could you please clarify the following for me:
- Which version(s) of HCL do Alloy tools currently support?
- Are there any specific configurations or settings required to use HCL 2 features if supported?
- If I’m using an older version, what steps should I take to upgrade to support the latest HCL version?
I would appreciate any documentation or resources that could also assist with understanding the proper use of HCL within the Alloy ecosystem.
Thank you for your help!
Best regards,
helloxjade
I could be wrong, but I don’t believe Alloy is actually using or conforming to HCL, it just looks like it. See GitHub - grafana/river: HCL-inspired configuration built for Grafana Agent.
You’re right @tonyswumac
The River configuration language was developed for Grafana Agent Flow. Quoting from the Agent documentation: “River is similar to HCL, the language Terraform and other Hashicorp projects use. It’s a distinct language with custom syntax and features, such as first-class functions.”
Alloy uses Alloy syntax which is essentially the new name for River as it is used in Alloy (the info about this name change is in the deprecation notice on the River page you linked).
So, to directly answer your question @helloxjade, Alloy doesn’t use any specific version of HCL. It uses the custom Alloy syntax which is similar to and inspired by HCL. You can read about the syntax in the Alloy documentation and if you really want to dig deep into the implementation of the Alloy syntax, you can check out the syntax directory in the Grafana Alloy GitHub repo: alloy/syntax at main · grafana/alloy · GitHub