hcl

package
v0.0.0-...-862afa6 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(wr io.Writer, args EncodeArgs) error

Encode writes the HCL encoded from the given stack into the given io.Writer.

func EncodeRaw

func EncodeRaw(wr io.Writer, val interface{}) error

EncodeRaw takes an empty Go interface and attempts to encode it using reflection and hcl tags in the provided Go struct. This should be used for edge cases only, and better to rely on Encode which takes a Exporter

Types

type Backend

type Backend struct {
	Type          string
	Configuration interface{}
}

type DataResource

type DataResource struct {
	DataSource    string
	LocalName     string
	Configuration interface{}
}

type EncodeArgs

type EncodeArgs struct {
	Backend       *Backend
	Providers     []Provider
	DataResources []DataResource
	Resources     []Resource
}

type Provider

type Provider struct {
	LocalName     string
	Source        string
	Version       string
	Configuration interface{}
}

type Resource

type Resource struct {
	Type          string
	LocalName     string
	Configuration interface{}
	DependsOn     Tokenizer
	Lifecycle     interface{}
}

type Tokenizer

type Tokenizer interface {
	// InternalTokens returns the HCL tokens that are rendered in the Terraform
	// configuration when a Terraform stack is exported.
	//
	// Internal: users should **not** use this!
	InternalTokens() (hclwrite.Tokens, error)
}

Jump to

Keyboard shortcuts

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