mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 09:36:44 +00:00
![Riley Karson](/assets/img/avatar_default.png)
```bash GO111MODULE=on go get github.com/hashicorp/terraform@pluginsdk-v0.12-early7 GO111MODULE=on go mod vendor GO111MODULE=on go mod tidy ```
36 lines
1.3 KiB
Go
36 lines
1.3 KiB
Go
package tfconfig
|
|
|
|
// Module is the top-level type representing a parsed and processed Terraform
|
|
// module.
|
|
type Module struct {
|
|
// Path is the local filesystem directory where the module was loaded from.
|
|
Path string `json:"path"`
|
|
|
|
Variables map[string]*Variable `json:"variables"`
|
|
Outputs map[string]*Output `json:"outputs"`
|
|
|
|
RequiredCore []string `json:"required_core,omitempty"`
|
|
RequiredProviders map[string][]string `json:"required_providers"`
|
|
|
|
ManagedResources map[string]*Resource `json:"managed_resources"`
|
|
DataResources map[string]*Resource `json:"data_resources"`
|
|
ModuleCalls map[string]*ModuleCall `json:"module_calls"`
|
|
|
|
// Diagnostics records any errors and warnings that were detected during
|
|
// loading, primarily for inclusion in serialized forms of the module
|
|
// since this slice is also returned as a second argument from LoadModule.
|
|
Diagnostics Diagnostics `json:"diagnostics,omitempty"`
|
|
}
|
|
|
|
func newModule(path string) *Module {
|
|
return &Module{
|
|
Path: path,
|
|
Variables: make(map[string]*Variable),
|
|
Outputs: make(map[string]*Output),
|
|
RequiredProviders: make(map[string][]string),
|
|
ManagedResources: make(map[string]*Resource),
|
|
DataResources: make(map[string]*Resource),
|
|
ModuleCalls: make(map[string]*ModuleCall),
|
|
}
|
|
}
|