Documentation ¶
Index ¶
- func HCL(v interface{}) ([]byte, error)
- func Map(v interface{}) map[string]interface{}
- func NewTerraformer(code []byte, variables map[string]interface{}, state *terraformer.State, ...) (*terraformer.Terraformer, error)
- func RemoveEnv(envConfig map[string]string, prefixes ...string) (map[string]string, map[string]string)
- func TrimLeft(envConfig map[string]string, prefix string) map[string]string
- type StateHook
- type UIHook
- func (h *UIHook) PostApply(addr addrs.AbsResourceInstance, gen states.Generation, newState cty.Value, ...) (terraform.HookAction, error)
- func (h *UIHook) PostImportState(addr addrs.AbsResourceInstance, imported []providers.ImportedResource) (terraform.HookAction, error)
- func (h *UIHook) PreApply(addr addrs.AbsResourceInstance, gen states.Generation, action plans.Action, ...) (terraform.HookAction, error)
- func (h *UIHook) PreImportState(addr addrs.AbsResourceInstance, importID string) (terraform.HookAction, error)
- func (h *UIHook) PreProvisionInstanceStep(addr addrs.AbsResourceInstance, typeName string) (terraform.HookAction, error)
- func (h *UIHook) PreRefresh(addr addrs.AbsResourceInstance, gen states.Generation, priorState cty.Value) (terraform.HookAction, error)
- func (h *UIHook) ProvisionOutput(addr addrs.AbsResourceInstance, typeName string, msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HCL ¶
HCL returns the configuration in HCL format. Required to generate the Terraform variables file
func Map ¶
func Map(v interface{}) map[string]interface{}
Map returns a map[string]interface type with all the variables. The keys in the map are the name of the json tag
func NewTerraformer ¶
func NewTerraformer(code []byte, variables map[string]interface{}, state *terraformer.State, clusterName string, platform string, ui *ui.UI) (*terraformer.Terraformer, error)
NewTerraformer creates and returns a terraformer to be used by a provisioner
Types ¶
type StateHook ¶
StateHook is a hook that continuously updates the state by calling WriteState on a state.State.
func (*StateHook) PostStateUpdate ¶
PostStateUpdate is call after the state is updated.
type UIHook ¶
UIHook inherit from terraform.NilHook and implement terraform.Hook which is the interface that must be implemented to hook into various parts of Terraform, allowing you to inspect or change behavior at runtime.
func (*UIHook) PostApply ¶
func (h *UIHook) PostApply(addr addrs.AbsResourceInstance, gen states.Generation, newState cty.Value, applyerr error) (terraform.HookAction, error)
PostApply is called after a single resource is applied. The error argument in PostApply is the error, if any, that was returned from the provIDer Apply call itself.
func (*UIHook) PostImportState ¶
func (h *UIHook) PostImportState(addr addrs.AbsResourceInstance, imported []providers.ImportedResource) (terraform.HookAction, error)
PostImportState is called after a single resource's state is being improted.
func (*UIHook) PreApply ¶
func (h *UIHook) PreApply(addr addrs.AbsResourceInstance, gen states.Generation, action plans.Action, priorState, plannedNewState cty.Value) (terraform.HookAction, error)
PreApply is called before a single resource is applied.
func (*UIHook) PreImportState ¶
func (h *UIHook) PreImportState(addr addrs.AbsResourceInstance, importID string) (terraform.HookAction, error)
PreImportState is called before a single resource's state is being improted.
func (*UIHook) PreProvisionInstanceStep ¶
func (h *UIHook) PreProvisionInstanceStep(addr addrs.AbsResourceInstance, typeName string) (terraform.HookAction, error)
PreProvisionInstanceStep should be self-explanatory
func (*UIHook) PreRefresh ¶
func (h *UIHook) PreRefresh(addr addrs.AbsResourceInstance, gen states.Generation, priorState cty.Value) (terraform.HookAction, error)
PreRefresh is called before a single resource state is refreshed.
func (*UIHook) ProvisionOutput ¶
func (h *UIHook) ProvisionOutput(addr addrs.AbsResourceInstance, typeName string, msg string)
ProvisionOutput is called with output sent back by the provisioners. This will be called multiple times as output comes in, but each call should represent a line of output. The ProvisionOutput method cannot control whether the hook continues running.