Documentation ¶
Index ¶
- func SortLiterals(v []*Literal)
- type Literal
- type OutputValue
- type TerraformWriter
- func (t *TerraformWriter) AddFileBytes(resourceType string, resourceName string, key string, data []byte, base64 bool) (*Literal, error)
- func (t *TerraformWriter) AddOutputVariable(key string, literal *Literal) error
- func (t *TerraformWriter) AddOutputVariableArray(key string, literal *Literal) error
- func (t *TerraformWriter) GetOutputs() (map[string]OutputValue, error)
- func (t *TerraformWriter) GetResourcesByType() (map[string]map[string]interface{}, error)
- func (t *TerraformWriter) InitTerraformWriter()
- func (t *TerraformWriter) RenderResource(resourceType string, resourceName string, e interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortLiterals ¶
func SortLiterals(v []*Literal)
SortLiterals sorts a list of Literal, by key. It does so in-place
Types ¶
type Literal ¶
type Literal struct { // Value is only used in terraform 0.11 and represents the literal string to use as a value. // "${}" interpolation is supported. Value string `cty:"value"` // The below fields are only used in terraform 0.12. // ResourceType represents the type of a resource in a literal reference ResourceType string `cty:"resource_type"` // ResourceName represents the name of a resource in a literal reference ResourceName string `cty:"resource_name"` // ResourceProp represents the property of a resource in a literal reference ResourceProp string `cty:"resource_prop"` // FilePath represents the path for a file reference FilePath string `cty:"file_path"` // FileFn represents the function used to reference the file FileFn fileFn `cty:"file_fn"` }
Literal represents a literal in terraform syntax
func LiteralFileExpression ¶
func LiteralFromStringValue ¶
func LiteralProperty ¶
func LiteralSelfLink ¶
func (*Literal) MarshalJSON ¶
type OutputValue ¶
type TerraformWriter ¶
type TerraformWriter struct { // Files is a map of TF resource Files that should be created Files map[string][]byte // contains filtered or unexported fields }
func (*TerraformWriter) AddFileBytes ¶
func (*TerraformWriter) AddOutputVariable ¶
func (t *TerraformWriter) AddOutputVariable(key string, literal *Literal) error
func (*TerraformWriter) AddOutputVariableArray ¶
func (t *TerraformWriter) AddOutputVariableArray(key string, literal *Literal) error
func (*TerraformWriter) GetOutputs ¶
func (t *TerraformWriter) GetOutputs() (map[string]OutputValue, error)
func (*TerraformWriter) GetResourcesByType ¶
func (t *TerraformWriter) GetResourcesByType() (map[string]map[string]interface{}, error)
func (*TerraformWriter) InitTerraformWriter ¶
func (t *TerraformWriter) InitTerraformWriter()
func (*TerraformWriter) RenderResource ¶
func (t *TerraformWriter) RenderResource(resourceType string, resourceName string, e interface{}) error
Click to show internal directories.
Click to hide internal directories.