Convert HCL to MSGPACK

Turn HCL files into MessagePack. The same structure and key order in MessagePack, with integers, floats, booleans, null, text, lists and maps keeping their types and dates as text.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop HCL files on the dialor turn it to pick what to do

Terraform settings as compact binary.The structure and key order of your HCL file, written as MessagePack.

  1. What you get

    One MessagePack file with the same structure and key order as the HCL. Integers, floats, booleans, null, text, lists and maps keep their types in the output.

    Dates become text, because the output holds them as strings.

  2. How blocks and expressions appear

    Blocks nest by type and label. Expressions become text in the ${...} form, so a reference stays readable as a string rather than being evaluated.

  3. Going back

    To turn MessagePack into HCL again, use MSGPACK to HCL. For other targets, see every HCL conversion.

HCL and MSGPACK.What each format is.

The formats

From · HCL

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
To · MSGPACK

MessagePack

Binary JSON: the same values as JSON in a compact byte encoding.

Extensions
.msgpack .mpk
MIME type
application/msgpack
Kind
Text and data

In your code.The same HCL to MSGPACK conversion through the API, for your app or your agent.

terminal
$ cv convert report.hcl report.msgpack
$ cv convert report.hcl report.msgpack

Questions.What people ask about HCL to MSGPACK.

01OF 04

Yes. The structure and key order stay the same in the MessagePack output.

Dates become text.

They become ${...} text. They are not turned into values.

The input format covers HCL files with the extensions hcl, tf and tfvars. The result is one file.

More conversions.Other ways in and out of HCL and MSGPACK.