Documentation ¶
Index ¶
- func SortLiterals(v []*Literal)
- type Literal
- func LiteralFromStringValue(s string) *Literal
- func LiteralFunctionExpression(functionName string, args []string) *Literal
- func LiteralProperty(resourceType, resourceName, prop string) *Literal
- func LiteralSelfLink(resourceType, resourceName string) *Literal
- func LiteralTokens(tokens ...string) *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 used to support Terraform's "${}" interpolation Value string `cty:"value"` // Tokens are portions of a literal reference joined by periods. // example: {"aws_vpc", "foo", "id"} Tokens []string `cty:"tokens"` // 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 LiteralTokens ¶ added in v1.21.3
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.