Closed sebglon closed 5 years ago
I use this code:
tfParamPath := "module." + moduleName + "." + field hclDoc, err := hclq.FromFile(file) if err != nil { return []string{}, errors.Wrapf(err, "Failed to read terraform file: %s", file) } res, err := hclDoc.GetAsList(tfParamPath)
But it fail with error: key 'partner_ips' found but is of wrong type, query requested key/literal, found list
key 'partner_ips' found but is of wrong type, query requested key/literal, found list
I use github.com/mattolenik/hclq v0.0.0-20190520172613-e55c48cdefcc
github.com/mattolenik/hclq v0.0.0-20190520172613-e55c48cdefcc
Solved. Sorry i have lost [] at the end of the query
[]
Well the error message certainly could be improved, so thanks for raising the issue! I opened #18 to track improving the message.
I use this code:
But it fail with error:
key 'partner_ips' found but is of wrong type, query requested key/literal, found list
I use
github.com/mattolenik/hclq v0.0.0-20190520172613-e55c48cdefcc