tfstate

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DsnippetQueryTmplate = `.resources[] | select(.name == "{{.ResourceName}}") | .instances[].attributes.content`
View Source
const ResourceNameQueryTmplate = `` /* 145-byte string literal not displayed */
View Source
const ServiceQueryTmplate = `` /* 153-byte string literal not displayed */

query templates for gojq

Variables

This section is empty.

Functions

This section is empty.

Types

type DSnippetQueryParams

type DSnippetQueryParams struct {
	ResourceName string
}

type ResourceNameQueryParams

type ResourceNameQueryParams struct {
	NestedBlockName string
	IDName          string
	ID              string
}

type ServiceQueryParams

type ServiceQueryParams struct {
	ResourceName    string
	NestedBlockName string
	Name            string
	AttributeName   string
}

type SetIndexKeyParams

type SetIndexKeyParams struct {
	ResourceType string
	ResourceName string
	Name         string
}

type TFState

type TFState struct {
	Value interface{}
}

func Load

func Load(workingDir string) (*TFState, error)

func (*TFState) AddTemplate

func (s *TFState) AddTemplate(tmpl string) (*TFStateWithTemplate, error)

func (TFState) Bytes

func (s TFState) Bytes() []byte

func (*TFState) Query

func (s *TFState) Query(query string) (*TFState, error)

func (*TFState) SetActivateAttributes

func (s *TFState) SetActivateAttributes() (*TFState, error)

func (*TFState) SetForceDestroy added in v0.2.1

func (s *TFState) SetForceDestroy() (*TFState, error)

func (*TFState) SetIndexKey

func (s *TFState) SetIndexKey(param SetIndexKeyParams) (*TFState, error)

func (*TFState) SetManageAttributes

func (s *TFState) SetManageAttributes() (*TFState, error)

func (*TFState) SetSensitiveAttributes

func (s *TFState) SetSensitiveAttributes(blockTypes map[string]struct{}) (*TFState, error)

func (TFState) String

func (s TFState) String() string

type TFStateWithTemplate

type TFStateWithTemplate struct {
	*template.Template
	*TFState
}

func (*TFStateWithTemplate) DSnippetQuery

func (s *TFStateWithTemplate) DSnippetQuery(params DSnippetQueryParams) (*TFState, error)

func (*TFStateWithTemplate) ResourceNameQuery

func (s *TFStateWithTemplate) ResourceNameQuery(params ResourceNameQueryParams) (*TFState, error)

func (*TFStateWithTemplate) ServiceQuery

func (s *TFStateWithTemplate) ServiceQuery(params ServiceQueryParams) (*TFState, error)

Jump to

Keyboard shortcuts

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