Convert HCL to PROPERTIES
Turn HCL files into PROPERTIES. Each value becomes one key=value line with Java escapes, under its path of keys joined with dots and list positions in brackets, such as server.hosts[0], and a top-level list is written under items, such as items[0].name.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop HCL files on the dialor turn it to pick what to do
HCL settings as flat key=value lines.Every value gets its own line, named by its path of keys.
What you get
One PROPERTIES file. Each value becomes one key=value line with Java escapes. The key is the path of keys to that value, joined with dots.
Blocks nest by type and label, so a block's values sit under its type and its label in the key.
How lists and paths look
List positions go in brackets, such as server.hosts[0]. A top-level list is written under items, such as items[0].name.
What changes
An empty object or list is written as JSON text, since it has no values to give lines of their own.
Expressions become ${...} text. They are written out as text, not worked out to a result.
HCL and PROPERTIES.What each format is.
The formats
HCL
HashiCorp Configuration Language, what Terraform and Packer files are written in.
- Extensions
- .hcl .tf .tfvars
- MIME type
- application
/x -hcl - Kind
- Text and data
Java Properties
Key and value pairs in the Java properties format.
- Extensions
- .properties
- MIME type
- text
/x -java -properties - Kind
- Text and data
In your code.The same HCL to PROPERTIES conversion through the API, for your app or your agent.
$ cv convert report.hcl report.properties$ cv convert report.hcl report.propertiesQuestions.What people ask about HCL to PROPERTIES.
HCL files, such as those ending in hcl, tf or tfvars. The result is one PROPERTIES file.
Keys are joined with dots, and list positions go in brackets. For example, server.hosts[0] is the first item in the hosts list under server.
It is written under items, so the first entry's name becomes items[0].name.
There is a separate conversion for that: PROPERTIES to HCL.