hashicorp / terraform-config-inspect

A helper library for shallow inspection of Terraform configurations
Mozilla Public License 2.0
371 stars 76 forks source link

Json UNMarshal of tfconfig.Module fails due to ResourceMode not supporting UNmarshalJSON #79

Open garthy opened 2 years ago

garthy commented 2 years ago

So I'm able to marshal tfconfig.Module to a file but I can't load it back.

Error: json: cannot unmarshal string into Go struct field Data.data_resources.mode of type tfconfig.ResourceMode

This is useful for a module info cache file

stevelizcano commented 1 year ago

Same problem here, Unmarshal will always fail.