output

package
v0.1.57 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-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 GetParsedById added in v0.1.46

func GetParsedById[T any](state *TfState, resourceId string) (*T, error)

func GetResourceName

func GetResourceName(r any) string

func MaybeGetParsed added in v0.1.54

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

func MaybeGetParsedById added in v0.1.54

func MaybeGetParsedById[T any](state *TfState, resourceId string) (*T, bool, error)

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) GetResourceId added in v0.1.38

func (t *TerraformDataSource) GetResourceId() string

func (*TerraformDataSource) SetName

func (t *TerraformDataSource) SetName(name string)

type TerraformResource

type TerraformResource struct {
	ResourceName string   `hcl:",key"`
	ResourceId   string   `hcl:",key" json:"id"`
	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) GetResourceId added in v0.1.38

func (t *TerraformResource) GetResourceId() string

func (*TerraformResource) SetName

func (t *TerraformResource) SetName(name string)

type TfBlock

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

type TfState

type TfState struct {
	Resources []TfStateFileResource `json:"resources"`
}

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)

func (*TfState) MaybeGet added in v0.1.54

func (t *TfState) MaybeGet(resourceRef string) (map[string]interface{}, bool)

type TfStateFileResource added in v0.1.55

type TfStateFileResource struct {
	Type      string `json:"type"`
	Name      string `json:"name"`
	Instances []struct {
		Attributes map[string]any `json:"attributes"`
	} `json:"instances"`
}

Jump to

Keyboard shortcuts

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