config

package
v0.0.0-...-743c9e3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigFileBaseName = "terradude.hcl"

Variables

This section is empty.

Functions

func DecodeBackendBlock

func DecodeBackendBlock(hclconfigs []*Config, ctx *hcl.EvalContext) (*hclwrite.Block, hcl.Diagnostics)

func DecodeGlobalCty

func DecodeGlobalCty(hclconfigs []*Config, ctx *hcl.EvalContext) (*cty.Value, int, hcl.Diagnostics)

func DecodeProviderBlocks

func DecodeProviderBlocks(configs []*Config, ctx *hcl.EvalContext) ([]*hclwrite.Block, hcl.Diagnostics)

func DecodeTerraformBlock

func DecodeTerraformBlock(configs []*Config, ctx *hcl.EvalContext) ([]*hclwrite.Block, hcl.Diagnostics)

Types

type Backend

type Backend struct {
	Name string   `hcl:"name,label"`
	Body hcl.Body `hcl:",remain"`
}

type Config

type Config struct {
	Terradude  *Terradude    `hcl:"terradude,block"`
	Terraform  *Terraform    `hcl:"terraform,block"`
	Dependency []*Dependency `hcl:"dependency,block"`
	Backend    *Backend      `hcl:"backend,block"`
	Provider   []*Provider   `hcl:"provider,block"`
	Globals    *Globals      `hcl:"globals,block"`
	Remain     hcl.Body      `hcl:",remain"`
}

func LoadConfigs

func LoadConfigs(configFileName string) ([]*Config, *cty.Value, hcl.Diagnostics)

type Dependency

type Dependency struct {
	Name string   `hcl:"name,label"`
	Body hcl.Body `hcl:",remain"`
}

type Global

type Global struct {
	Name  string
	Value cty.Value
}

type Globals

type Globals struct {
	Body hcl.Body `hcl:",remain"`
}

type Module

type Module struct {
	Name string   `hcl:"name,label"`
	Body hcl.Body `hcl:",remain"`
}

type Output

type Output struct {
	Name string   `hcl:"name,label"`
	Body hcl.Body `hcl:",remain"`
}

type Provider

type Provider struct {
	Name    string   `hcl:"name,label"`
	Version *string  `hcl:"version,attr"`
	Alias   *string  `hcl:"alias,attr"`
	Body    hcl.Body `hcl:",remain"`
}

type Terradude

type Terradude struct {
	Version string   `hcl:"version"`
	Remain  hcl.Body `hcl:",remain"`
}

type Terraform

type Terraform struct {
	Module Module    `hcl:"module,block"`
	Output []*Output `hcl:"output,block"`
}

Jump to

Keyboard shortcuts

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