Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Input ¶
type Input struct { Name string `json:"name"` Type String `json:"type"` Description String `json:"description"` Default interface{} `json:"default"` Position Position `json:"-"` }
Input represents a Terraform input.
func (*Input) HasDefault ¶
HasDefault indicates if a Terraform variable has a default value set.
type Module ¶
type Module struct { Header string `json:"header"` Inputs []*Input `json:"inputs"` Outputs []*Output `json:"outputs"` Providers []*Provider `json:"providers"` RequiredInputs []*Input `json:"-"` OptionalInputs []*Input `json:"-"` }
Module represents a Terraform mod. It consists of - Header ('header' json key): Module header found in shape of multi line comments at the beginning of 'main.tf' - Inputs ('inputs' json key): List of input 'variables' extracted from the Terraform module .tf files - Outputs ('outputs' json key): List of 'outputs' extracted from Terraform module .tf files - Providers ('providers' json key): List of 'providers' extracted from resources used in Terraform module
func CreateModule ¶
CreateModule returns new instance of Module with all the inputs and outputs dircoverd from provided 'path' containing Terraform config
func (*Module) HasOutputs ¶
HasOutputs indicates if the document has outputs.
type Output ¶
type Output struct { Name string `json:"name"` Description String `json:"description"` Position Position `json:"-"` }
Output represents a Terraform output.
type Provider ¶
type Provider struct { Name string `json:"name"` Alias String `json:"alias"` Version String `json:"version"` Position Position `json:"-"` }
Provider represents a Terraform output.
type String ¶
type String string
String represents a 'string' value which JSON marshaled to `null` when empty
func (*String) MarshalJSON ¶
MarshalJSON custom marshal function which sets the value to literal `null` when empty
func (*String) UnmarshalJSON ¶
UnmarshalJSON custom unmarshal function which sets the value to `""` when the json property is `null`