mercari/hcledit

[feature] Indexing

Opened this issue · 0 comments

Currently there is no support for indexing on a list. Ideally we should be able to query and write to specific objects within a list. For example, if we have the following HCL file:

# attrs.tf
attribute = ["str1", "str2", "str3"]

I would expect the following query to work and return the following result:

$ hcledit read -o go-template="{{.Value}}" "attribute[1]" attrs.tf
str2