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
Hey, I am trying to parse terraform HCL into Golang struct and im facing issues when trying to parse an object inside a Module block. this it the example I am trying to make work:
Terraform file:
The "hcl" struct tags only interact with HCL blocks and their direct attributes. From HCL's perspective that versioning argument is just a single expression evaluated all at once, so HCL does not destructure it.
gohcl handles each attribute by passing it to gohcl.DecodeExpression, which in turn delegates to a third-party package gocty to convert to the final type. Therefore you would need to use that package's struct tags for your type Versioning:
Hey, I am trying to parse terraform HCL into Golang struct and im facing issues when trying to parse an object inside a Module block. this it the example I am trying to make work:
Terraform file:
Golang struct:
I am being able to parse both of
source
andbucket
attributes, however, no matter what I try I was not able to parse theversioning
attribute.The text was updated successfully, but these errors were encountered: