formatting

package module
v0.0.0-...-de08859 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBackendConfigAsArgs

func FormatBackendConfigAsArgs(vars map[string]interface{}) []string

FormatBackendConfigAsArgs formats the given variables as backend config args (e.g. of the format -backend-config=key=value). Used by both Terraform and Terragrunt.

func FormatPluginDirAsArgs

func FormatPluginDirAsArgs(pluginDir string) []string

FormatPluginDirAsArgs formats the plugin-dir variable -plugin-dir

func FormatTerraformArgs

func FormatTerraformArgs(vars map[string]interface{}, prefix string, useSpaceAsSeparator bool, omitNil bool) []string

FormatTerraformArgs formats the given vars into HCL command-line argument format, with each var being prefixed with the given prefix. This is used by both Terraform and Terragrunt commands. If useSpaceAsSeparator is true, a space will separate the prefix and each var (e.g., -var foo=bar). If useSpaceAsSeparator is false, an equals will separate the prefix and each var (e.g., -backend-config=foo=bar). If omitNil is false, then nil values will be included as "null" (e.g. -backend-config=foo=null). If omitNil is true, then nil values will be formatted without the value (e.g. -backend-config=foo).

Types

This section is empty.

Jump to

Keyboard shortcuts

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