tfutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerEnv

func DockerEnv(m map[string]string) []string

DockerEnv returns the keys and values of the map in the form "key=value" sorted by key in lexicographical order. This is the format expected by Docker and some other tools that consume environment variables.

func TFListToStringSlice

func TFListToStringSlice(l types.List) []string

TFListToStringSlice converts a types.List to a []string by calling tfValueToString on each element.

func TFLogFunc

func TFLogFunc(ctx context.Context) log.Func

TFLogFunc is an adapter to envbuilder/log.Func.

func TFMapToStringMap

func TFMapToStringMap(m types.Map) map[string]string

TFMapToStringMap converts a types.Map to a map[string]string by calling tfValueToString on each element.

func TFValueToString

func TFValueToString(val attr.Value) string

TFValueToString converts an attr.Value to its string representation based on its Terraform type. This is needed because the String() method on an attr.Value creates a 'human-readable' version of the type, which leads to quotes, escaped characters, and other assorted sadness.

Types

This section is empty.

Jump to

Keyboard shortcuts

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