terramlparser

package
v0.0.0-...-6389ee5 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineTaskType

func DetermineTaskType(task Task) string

func GetDeploymentManifest

func GetDeploymentManifest(filePath string, variableFilePath string) ([]string, map[string]interface{}, error)

func GetModuleBlock

func GetModuleBlock(moduleProvisionTask Module) (string, map[string]interface{})

func GetResourceBlock

func GetResourceBlock(resourceProvisionTask Resource) (string, map[string]interface{})

func GetTaskBlock

func GetTaskBlock(task Task) (string, string, map[string]interface{}, error)

func PathToResource

func PathToResource() string

Types

type Module

type Module struct {
	Src  string                 `yaml:"src"`
	Name string                 `yaml:"name"`
	Var  map[string]interface{} `yaml:"var"`
}

func (*Module) IsEmpty

func (m *Module) IsEmpty() bool

type Provider

type Provider struct {
	Name   string                   `yaml:"name"`
	Config []map[string]interface{} `yaml:"config"`
}

type RemoteState

type RemoteState struct {
	BackendType string                 `yaml:"backend"`
	Config      map[string]interface{} `yaml:"config"`
}

type Resource

type Resource struct {
	ResourceType string                 `yaml:"type"`
	Name         string                 `yaml:"name"`
	Config       map[string]interface{} `yaml:"config"`
}

func (*Resource) IsEmpty

func (r *Resource) IsEmpty() bool

type Task

type Task struct {
	Module   Module   `yaml:"module"`
	Resource Resource `yaml:"resource"`
}

type TerraformConf

type TerraformConf struct {
	RemoteState RemoteState `yaml:"remote_state"`
}

type TerramlFileContent

type TerramlFileContent struct {
	TerraformConf TerraformConf `yaml:"terraform_conf"`
	Providers     []Provider    `yaml:"providers"`
	Provision     []Task        `yaml:"provision"`
}

type TerramlParser

type TerramlParser struct {
	TerramlFileContent TerramlFileContent
	Variables          interface{}
	DeploymentManifest map[string]interface{}
	RenderedFilePath   string
}

func (*TerramlParser) BuildResourcePathVariable

func (p *TerramlParser) BuildResourcePathVariable()

func (*TerramlParser) Cleanup

func (p *TerramlParser) Cleanup()

func (*TerramlParser) GetProviderBlock

func (p *TerramlParser) GetProviderBlock() map[string]interface{}

func (*TerramlParser) GetProvisionBlock

func (p *TerramlParser) GetProvisionBlock() ([]string, error)

func (*TerramlParser) GetTerraformConfBlock

func (p *TerramlParser) GetTerraformConfBlock()

func (*TerramlParser) LoadVariables

func (p *TerramlParser) LoadVariables(varFilePath string) error

func (*TerramlParser) ParseTerramlFile

func (p *TerramlParser) ParseTerramlFile() error

func (*TerramlParser) RenderTerramlFileWithVariables

func (p *TerramlParser) RenderTerramlFileWithVariables(filePath string) error

Jump to

Keyboard shortcuts

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