kvz/json2hcl

Json2hcl reverse is not working.

roylkng opened this issue · 2 comments

I tried reverse on the tf file in the fixtures, but it gets stuck without any output.

Thank you for this report, but as stated in the README:

We don't use json2hcl anymore ourselves, so we can't invest time into it. However, we're still welcoming PRs.

Adding a test case if someone wants to fix this.

$ cat test-vars.tf 
variable "my_var" {
  type        = string
  description = "This is a variable"
  default     = "foo"
}

$ terraform fmt test-vars.tf

$ cat test-vars.tf | json2hcl -reverse
unable to parse HCL: At 2:17: Unknown token: 2:17 IDENT string