github.com/pulumi/terraform@v1.4.0/pkg/earlyconfig/module.go (about)

     1  package earlyconfig
     2  
     3  import (
     4  	"github.com/hashicorp/terraform-config-inspect/tfconfig"
     5  	"github.com/pulumi/terraform/pkg/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  }