]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blob - vendor/github.com/hashicorp/terraform-config-inspect/tfconfig/module.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform-config-inspect / tfconfig / module.go
1 package tfconfig
2
3 // Module is the top-level type representing a parsed and processed Terraform
4 // module.
5 type Module struct {
6 // Path is the local filesystem directory where the module was loaded from.
7 Path string `json:"path"`
8
9 Variables map[string]*Variable `json:"variables"`
10 Outputs map[string]*Output `json:"outputs"`
11
12 RequiredCore []string `json:"required_core,omitempty"`
13 RequiredProviders map[string][]string `json:"required_providers"`
14
15 ManagedResources map[string]*Resource `json:"managed_resources"`
16 DataResources map[string]*Resource `json:"data_resources"`
17 ModuleCalls map[string]*ModuleCall `json:"module_calls"`
18
19 // Diagnostics records any errors and warnings that were detected during
20 // loading, primarily for inclusion in serialized forms of the module
21 // since this slice is also returned as a second argument from LoadModule.
22 Diagnostics Diagnostics `json:"diagnostics,omitempty"`
23 }
24
25 func newModule(path string) *Module {
26 return &Module{
27 Path: path,
28 Variables: make(map[string]*Variable),
29 Outputs: make(map[string]*Output),
30 RequiredProviders: make(map[string][]string),
31 ManagedResources: make(map[string]*Resource),
32 DataResources: make(map[string]*Resource),
33 ModuleCalls: make(map[string]*ModuleCall),
34 }
35 }