Documentation ¶
Index ¶
- Constants
- func FuncMap(ctx context.Context, stateLoc string) (template.FuncMap, error)
- func FuncMapWithName(ctx context.Context, name string, stateLoc string) (template.FuncMap, error)
- func JsonnetNativeFuncs(ctx context.Context, prefix, stateLoc string) ([]*jsonnet.NativeFunction, error)
- func MustFuncMap(ctx context.Context, stateLoc string) template.FuncMap
- func MustFuncMapWithName(ctx context.Context, name string, stateLoc string) template.FuncMap
- type Object
- type TFState
- func (s *TFState) Dump() (map[string]*Object, error)
- func (s *TFState) FuncMap(ctx context.Context) template.FuncMap
- func (s *TFState) FuncMapWithName(ctx context.Context, name string) template.FuncMap
- func (s *TFState) JsonnetNativeFuncs(ctx context.Context) []*jsonnet.NativeFunction
- func (s *TFState) JsonnetNativeFuncsWithPrefix(ctx context.Context, prefix string) []*jsonnet.NativeFunction
- func (s *TFState) List() ([]string, error)
- func (s *TFState) Lookup(key string) (*Object, error)
Constants ¶
View Source
const (
StateVersion = 4
)
Variables ¶
This section is empty.
Functions ¶
func FuncMapWithName ¶
FuncMapWithName provides a template.FuncMap. can lockup values from tfstate.
func JsonnetNativeFuncs ¶
func JsonnetNativeFuncs(ctx context.Context, prefix, stateLoc string) ([]*jsonnet.NativeFunction, error)
JsonnetNativeFuncs provides the native functions for go-jsonnet.
func MustFuncMap ¶
MustFuncMap is similar to FuncMap, but panics if it cannot get and parse tfstate.
Types ¶
type Object ¶
type Object struct {
Value interface{}
}
func (*Object) MarshalJSON ¶
type TFState ¶
type TFState struct {
// contains filtered or unexported fields
}
TFState represents a tfstate
func ReadFile ¶
ReadFile reads terraform.tfstate from the file (Firstly, a workspace reads TF_WORKSPACE environment variable. if it doesn't exist, it reads from environment file in the same directory)
func ReadWithWorkspace ¶
ReadWithWorkspace reads a tfstate from io.Reader with workspace
func (*TFState) FuncMapWithName ¶
func (*TFState) JsonnetNativeFuncs ¶
TFState provides a tfstate.
func (*TFState) JsonnetNativeFuncsWithPrefix ¶
func (s *TFState) JsonnetNativeFuncsWithPrefix(ctx context.Context, prefix string) []*jsonnet.NativeFunction
JsonnetNativeFuncsWithPrefix provides the native functions for go-jsonnet with prefix.
Click to show internal directories.
Click to hide internal directories.