github.com/bridgecrewio/terraform@v0.11.12-beta1/registry/response/module_versions.go (about)

     1  package response
     2  
     3  // ModuleVersions is the response format that contains all metadata about module
     4  // versions needed for terraform CLI to resolve version constraints. See RFC
     5  // TF-042 for details on this format.
     6  type ModuleVersions struct {
     7  	Modules []*ModuleProviderVersions `json:"modules"`
     8  }
     9  
    10  // ModuleProviderVersions is the response format for a single module instance,
    11  // containing metadata about all versions and their dependencies.
    12  type ModuleProviderVersions struct {
    13  	Source   string           `json:"source"`
    14  	Versions []*ModuleVersion `json:"versions"`
    15  }
    16  
    17  // ModuleVersion is the output metadata for a given version needed by CLI to
    18  // resolve candidate versions to satisfy requirements.
    19  type ModuleVersion struct {
    20  	Version    string              `json:"version"`
    21  	Root       VersionSubmodule    `json:"root"`
    22  	Submodules []*VersionSubmodule `json:"submodules"`
    23  }
    24  
    25  // VersionSubmodule is the output metadata for a submodule within a given
    26  // version needed by CLI to resolve candidate versions to satisfy requirements.
    27  // When representing the Root in JSON the path is omitted.
    28  type VersionSubmodule struct {
    29  	Path         string               `json:"path,omitempty"`
    30  	Providers    []*ModuleProviderDep `json:"providers"`
    31  	Dependencies []*ModuleDep         `json:"dependencies"`
    32  }