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 S3Option
- 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 ¶
const S3EndpointEnvKey = "AWS_ENDPOINT_URL_S3"
const (
StateVersion = 4
)
Variables ¶
This section is empty.
Functions ¶
func FuncMap ¶ added in v0.0.12
FuncMap provides a template.FuncMap tfstate based on URL and provide
func FuncMapWithName ¶ added in v0.0.12
FuncMapWithName provides a template.FuncMap. can lockup values from tfstate.
func JsonnetNativeFuncs ¶ added in v1.3.0
func JsonnetNativeFuncs(ctx context.Context, prefix, stateLoc string) ([]*jsonnet.NativeFunction, error)
JsonnetNativeFuncs provides the native functions for go-jsonnet.
func MustFuncMap ¶ added in v0.0.12
MustFuncMap is similar to FuncMap, but panics if it cannot get and parse tfstate.
Types ¶
type Object ¶ added in v0.0.2
type Object struct {
Value interface{}
}
func (*Object) MarshalJSON ¶ added in v1.4.0
type TFState ¶
type TFState struct {
// contains filtered or unexported fields
}
TFState represents a tfstate
func ReadFile ¶ added in v0.0.3
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 ¶ added in v0.0.3
ReadWithWorkspace reads a tfstate from io.Reader with workspace
func (*TFState) Dump ¶ added in v1.4.0
Dump dumps all resources, outputs, and data sources in tfstate
func (*TFState) FuncMapWithName ¶ added in v1.3.2
func (*TFState) JsonnetNativeFuncs ¶ added in v1.3.2
TFState provides a tfstate.
func (*TFState) JsonnetNativeFuncsWithPrefix ¶ added in v1.3.2
func (s *TFState) JsonnetNativeFuncsWithPrefix(ctx context.Context, prefix string) []*jsonnet.NativeFunction
JsonnetNativeFuncsWithPrefix provides the native functions for go-jsonnet with prefix.