Documentation
¶
Index ¶
- Variables
- func Provider() terraform.ResourceProvider
- func RandomSafeString(length int) string
- func RandomString(length int) string
- func RandomStringWithCharset(length int, charset string) string
- func ToString(val interface{}) string
- type ChangeMap
- type CommandTemplates
- type CommandsConfig
- type EnvironmentChangeMap
- type EnvironmentConfig
- type KVEntry
- type LoggedOutput
- type Logger
- type Logging
- type Operation
- type OutputConfig
- type ProviderConfig
- type ResourceConfig
- type ResourceData
- func (d *ResourceData) Get(key string) interface{}
- func (d *ResourceData) GetChange(key string) (interface{}, interface{})
- func (d *ResourceData) GetChangedKeysPrefix(prefix string) []string
- func (d *ResourceData) GetOk(key string) (interface{}, bool)
- func (d *ResourceData) Set(key string, value interface{}) error
- func (d *ResourceData) SetIdErr(value string) error
- type ResourceDiff
- type ResourceInterface
- type Scripted
- type TemplateArg
- type TemplateContext
- type TemplatesConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = getEnvBool("DEBUG", false)
View Source
var DefaultEnvPrefix = "TF_SCRIPTED_"
View Source
var DefaultStatePrefix = `WViRV1TbGAGehAYFL8g3ZL8o1cg1bxaq`
View Source
var DefaultTriggerString = `ndn4VFxYG489bUmV6xKjKFE0RYQIJdts`
View Source
var EmptyString = getEnvMust("EMPTY_STRING", `ZVaXr3jCd80vqJRhBP9t83LrpWIdNKWJ`)
String representing empty value, can be set to anything
View Source
var EnvPrefix = envDefault("TF_SCRIPTED_ENV_PREFIX", DefaultEnvPrefix)
View Source
var ExtraTemplateFuncs = template.FuncMap{
"toYaml": toYaml,
"fromYaml": fromYaml,
"toJson": toJson,
"toPrettyJson": toPrettyJson,
"fromJson": fromJson,
"is": is,
"isSet": isSet,
"isFilled": isFilled,
"terraformifyValues": terraformifyPrimitives,
}
View Source
var SprigTemplateFuncs = getSprigTemplateFuncs()
View Source
var StatePrefixEnvKey = envKey("STATE_PREFIX")
View Source
var Stderr = os.Stderr
Store original os.Stderr and os.Stdout, because it gets overwritten by go-plugin/server:Serve()
View Source
var Stdout = os.Stdout
View Source
var TemplateFuncs = getTemplateFuncs()
View Source
var TriggerStringEnvKey = envKey("TRIGGER_STRING")
View Source
var TriggerStringTpl = `{{ .TriggerString }}`
View Source
var ValidLogLevelsStrings = []string{"TRACE", "DEBUG", "INFO", "WARN", "ERROR"}
Functions ¶
func Provider ¶
func Provider() terraform.ResourceProvider
func RandomSafeString ¶
func RandomString ¶
func RandomStringWithCharset ¶
Types ¶
type CommandTemplates ¶
type CommandsConfig ¶
type CommandsConfig struct {
Environment *EnvironmentConfig
Templates *CommandTemplates
Output *OutputConfig
CreateAfterUpdate bool
DeleteBeforeUpdate bool
DeleteOnNotExists bool
DeleteOnReadFailure bool
Separator string
WorkingDirectory string
TriggerString string
}
type EnvironmentChangeMap ¶
type EnvironmentConfig ¶
type LoggedOutput ¶
type LoggedOutput struct {
// contains filtered or unexported fields
}
func (*LoggedOutput) Close ¶
func (lo *LoggedOutput) Close()
func (*LoggedOutput) Start ¶
func (lo *LoggedOutput) Start() *io.PipeWriter
type OutputConfig ¶
type ProviderConfig ¶
type ProviderConfig struct {
Commands *CommandsConfig
Logging *Logging
Templates *TemplatesConfig
RunningMessageInterval float64
EmptyString string
LoggingBufferSize int64
OutputLinePrefix string
OutputFormat string
StateFormat string
StateLinePrefix string
}
type ResourceConfig ¶
type ResourceConfig struct {
Context *ChangeMap
// contains filtered or unexported fields
}
type ResourceData ¶
type ResourceData struct {
*schema.ResourceData
}
func (*ResourceData) Get ¶
func (d *ResourceData) Get(key string) interface{}
func (*ResourceData) GetChange ¶
func (d *ResourceData) GetChange(key string) (interface{}, interface{})
func (*ResourceData) GetChangedKeysPrefix ¶
func (d *ResourceData) GetChangedKeysPrefix(prefix string) []string
func (*ResourceData) GetOk ¶
func (d *ResourceData) GetOk(key string) (interface{}, bool)
func (*ResourceData) Set ¶
func (d *ResourceData) Set(key string, value interface{}) error
func (*ResourceData) SetIdErr ¶
func (d *ResourceData) SetIdErr(value string) error
type ResourceDiff ¶
type ResourceDiff struct {
*schema.ResourceDiff
}
func (*ResourceDiff) GetChange ¶
func (rd *ResourceDiff) GetChange(key string) (o interface{}, n interface{})
func (*ResourceDiff) GetChangedKeysPrefix ¶
func (rd *ResourceDiff) GetChangedKeysPrefix(prefix string) []string
func (*ResourceDiff) Set ¶
func (rd *ResourceDiff) Set(key string, value interface{}) error
func (*ResourceDiff) SetIdErr ¶
func (rd *ResourceDiff) SetIdErr(string) error
type ResourceInterface ¶
type ResourceInterface interface {
GetChange(string) (interface{}, interface{})
Get(string) interface{}
GetOk(string) (interface{}, bool)
Set(string, interface{}) error
Id() string
SetIdErr(string) error
GetChangedKeysPrefix(string) []string
}
func WrapResourceData ¶
func WrapResourceData(data *schema.ResourceData) ResourceInterface
func WrapResourceDiff ¶
func WrapResourceDiff(diff *schema.ResourceDiff) ResourceInterface
type Scripted ¶
type Scripted struct {
// contains filtered or unexported fields
}
func New ¶
func New(d ResourceInterface, meta interface{}, operation Operation, old bool) (*Scripted, error)
func (*Scripted) Environment ¶
func (s *Scripted) Environment() (*EnvironmentChangeMap, error)
type TemplateArg ¶
type TemplateArg struct {
// contains filtered or unexported fields
}
type TemplateContext ¶
type TemplatesConfig ¶
Click to show internal directories.
Click to hide internal directories.