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 JSON output via the TerraformJSON feature flag // "${}" interpolation is supported. Value string `cty:"value"` // 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"` // FnName represents the name of a terraform function. FnName string `cty:"fn_name"` // FnArgs contains string representations of arguments to the function call. // Any string arguments must be quoted. FnArgs []string `cty:"fn_arg"` }
Literal represents a literal in terraform syntax
func LiteralFromStringValue ¶
func LiteralFunctionExpression ¶ added in v1.21.3
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.