output

package
v0.1.37 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParsed added in v0.1.16

func GetParsed[T any](state *TfState, resourceRef string) (*T, error)

func GetResourceName

func GetResourceName(r any) string

func WrapWithBlockType

func WrapWithBlockType(block TfBlock) (any, error)

Types

type DataSourceWrapper

type DataSourceWrapper struct {
	R any `hcl:"data"`
}

func (DataSourceWrapper) GetR

func (r DataSourceWrapper) GetR() any

type ResourceWrapper

type ResourceWrapper struct {
	R any `hcl:"resource"`
}

ResourceWrapper just to add a resource {} around when encoding into hcl

func (ResourceWrapper) GetR

func (r ResourceWrapper) GetR() any

type TerraformDataSource

type TerraformDataSource struct {
	ResourceName string   `hcl:",key"`
	ResourceId   string   `hcl:",key"`
	DependsOn    []string `hcl:"depends_on,expr"  hcle:"omitempty"`
}

func (*TerraformDataSource) AddDependency

func (t *TerraformDataSource) AddDependency(dep string)

func (TerraformDataSource) GetBlockType

func (t TerraformDataSource) GetBlockType() string

func (TerraformDataSource) GetFullResourceRef

func (t TerraformDataSource) GetFullResourceRef() string

func (*TerraformDataSource) SetName

func (t *TerraformDataSource) SetName(name string)

type TerraformResource

type TerraformResource struct {
	ResourceName string   `hcl:",key"`
	ResourceId   string   `hcl:",key"`
	DependsOn    []string `hcl:"depends_on,expr" hcle:"omitempty"`
}

func (*TerraformResource) AddDependency

func (t *TerraformResource) AddDependency(dep string)

func (TerraformResource) GetBlockType

func (t TerraformResource) GetBlockType() string

func (TerraformResource) GetFullResourceRef

func (t TerraformResource) GetFullResourceRef() string

func (*TerraformResource) SetName

func (t *TerraformResource) SetName(name string)

type TfBlock

type TfBlock interface {
	GetFullResourceRef() string
	GetBlockType() string
	AddDependency(string)
}

type TfResource

type TfResource struct {
	Address string                 `json:"address"`
	Values  map[string]interface{} `json:"values"`
}

type TfState

type TfState struct {
	Values struct {
		RootModule struct {
			Resources []TfResource `json:"resources"`
		} `json:"root_module"`
	} `json:"values"`
}

func (*TfState) Get added in v0.1.16

func (t *TfState) Get(resourceRef string) (map[string]interface{}, error)

func (*TfState) GetValues

func (t *TfState) GetValues(resourceType any, resourceId string) (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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