You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have one query regarding conversion of HCL to/from JSON . Conversion from HCL to JSON seems fine however while converting back the generated json to HCL it is not same . As seen in the example below docker_ports was single element of type list / array when converted to json whereas when it is converted back to HCL from from json , docker_ports is represented as two elements instead of two .Any idea why it was not exactly same as orignal HCL after conversion? Any way to get back same HCL format ?
@nj2208 the output you provided above is expected. This is how HCL1 represents multiple list items by default. There is no way to recover the original version, since that information is lost when the file is converted to JSON.
@sclevine It was my fault, sorry! 🤦🏻 All is good, but it would be nice if the unnecessary quotes were not added so that HCL looks more natural. In general, any valid JSON file is a valid HCL, so there is no need to do anything, but the value of this tool is to generate something more useful.
Hi
Have one query regarding conversion of HCL to/from JSON . Conversion from HCL to JSON seems fine however while converting back the generated json to HCL it is not same . As seen in the example below docker_ports was single element of type list / array when converted to json whereas when it is converted back to HCL from from json , docker_ports is represented as two elements instead of two .Any idea why it was not exactly same as orignal HCL after conversion? Any way to get back same HCL format ?
Original tfvars file
Conversion of HCL to json
JSON to HCL conversion
Thanks a lot !
The text was updated successfully, but these errors were encountered: