8000 Making convert Body/ Blocks/ Attributes etc public? · Issue #60 · tmccombs/hcl2json · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Making convert Body/ Blocks/ Attributes etc public?  #60
Open
@shrds

Description

@shrds

I would like to thank you @tmccombs for writing this library!
You think we can make convertBody, convertBlock convertExpression public? I have a requirement where I need to update several terraform files and hclwrite package makes is possible to perform that operation. However hclwrite doesn't provide easy access to all the attributes/ expression. e.g. if I want to read existing attribute and update them programatically.

I think after I convert hclwrite.Expression to hclsyntax.Expression, I should be able to read attributes from hcl to json using your library. I wish this was organically available in HCLWrite but unfortunately it's not.

hclsyntaxExpr, _ := hclsyntax.ParseExpression(tagsAttr.Expr().BuildTokens(nil).Bytes(), "", hcl.InitialPos)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0