github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/earlyconfig/module.go (about) 1 package earlyconfig 2 3 import ( 4 "github.com/hashicorp/terraform-config-inspect/tfconfig" 5 "github.com/hashicorp/terraform-plugin-sdk/internal/tfdiags" 6 ) 7 8 // LoadModule loads some top-level metadata for the module in the given 9 // directory. 10 func LoadModule(dir string) (*tfconfig.Module, tfdiags.Diagnostics) { 11 mod, diags := tfconfig.LoadModule(dir) 12 return mod, wrapDiagnostics(diags) 13 }