Convert HCL to CBOR

Turn HCL files into CBOR. The same structure and key order in CBOR, with integers, floats, booleans, null, text, arrays 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

HCL settings as CBOR data.The structure and key order of your HCL file are written out as CBOR.

  1. What you get

    One CBOR file with the same structure and the same key order as the HCL file. Integers, floats, booleans, null, text, arrays and maps keep their types.

    Blocks nest by type and label. Dates are written as text.

  2. What changes

    Expressions become text in the form ${...}. They are not evaluated, so a value that refers to something else is stored as that text.

HCL and CBOR.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 · CBOR

CBOR

Concise Binary Object Representation, the binary JSON of IoT and web standards.

Extensions
.cbor
MIME type
application/cbor
Kind
Text and data

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

terminal
$ cv convert report.hcl report.cbor
$ cv convert report.hcl report.cbor

Questions.What people ask about HCL to CBOR.

01OF 04

Files in HCL, the language Terraform and Packer files are written in. These usually end in .hcl, .tf or .tfvars.

Yes. The CBOR file keeps the order of the keys from the HCL file.

Dates are stored as text, not as a CBOR date type.

Yes. CBOR to HCL converts in the other direction.

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