hcl

package
v1.3.28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2025 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeTerraformVariable added in v0.1.818

func EncodeTerraformVariable(secretVariableResource terraform.TerraformVariable) *hclwrite.Block

func IsInterpolation

func IsInterpolation(value string) bool

func RemoveId

func RemoveId(value string) string

RemoveId removes the id suffix from a string.

func RemoveInterpolation

func RemoveInterpolation(value string) string

RemoveInterpolation removes the Terraform 0.x style interpolations to produce a Terraform 1.x style "naked" reference.

func WriteActionProperties

func WriteActionProperties(block *hclwrite.Block, stepName string, actionName string, properties map[string]string)

WriteActionProperties is used to pretty print the properties of an action, writing a multiline map for the properties, and extracting JSON blobs as maps for easy reading.

func WriteImportComments added in v0.1.819

func WriteImportComments(baseUrl string, resourceType string, tfResourceType string, resourceName string, tfResourceName string) []*hclwrite.Token

func WriteLifecycleAllAttribute

func WriteLifecycleAllAttribute(block *hclwrite.Block) *hclwrite.Block

WriteLifecycleAllAttribute writes a lifecycle block with ignore_changes set to all

func WriteLifecycleAttribute added in v0.1.690

func WriteLifecycleAttribute(block *hclwrite.Block, attributes string) *hclwrite.Block

WriteLifecycleAttribute writes a lifecycle block with ignore_changes set to the supplied list

func WriteLifecyclePostCondition added in v0.1.467

func WriteLifecyclePostCondition(block *hclwrite.Block, errorMessage string, condition string)

WriteLifecyclePostCondition writes a lifecycle block with a postcondition

func WriteLifecyclePreventDestroyAttribute added in v0.1.940

func WriteLifecyclePreventDestroyAttribute(block *hclwrite.Block)

WriteLifecyclePreventDestroyAttribute writes a lifecycle block with prevent_destroy set to true

func WriteStepProperties added in v0.1.1566

func WriteStepProperties(propertyName string, block *hclwrite.Block, properties map[string]string)

WriteStepProperties is used to pretty print the properties of a v1 step, writing a multiline map for the properties, and extracting JSON blobs as maps for easy reading.

func WriteUnquotedAttribute

func WriteUnquotedAttribute(block *hclwrite.Block, attrName string, attrValue string)

WriteUnquotedAttribute uses the example from https://github.com/hashicorp/hcl/issues/442 to add an unquoted attribute to a block

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL