Documentation ¶
Index ¶
- Constants
- func DependencyToBashRemoteState(dep *project.DependencyOutput) (remoteStateRef string)
- func DependencyToRemoteStateRef(dep *project.DependencyOutput) (remoteStateRef string)
- func StringRemStScanner(data reflect.Value, unit project.Unit) (reflect.Value, error)
- func TerraformJSONParser(in string, out interface{}) error
- type Factory
- type RequiredProvider
- type TerraformTemplateDriver
- type Unit
- func (m *Unit) AddRequiredProvider(name, source, version string)
- func (m *Unit) Apply() error
- func (m *Unit) Build() error
- func (m *Unit) Destroy() error
- func (m *Unit) GetDiffData() interface{}
- func (m *Unit) GetState() interface{}
- func (m *Unit) GetStateDiffData() interface{}
- func (m *Unit) GetTemplateDriver() (string, project.TemplateDriver)
- func (m *Unit) GetUnitDiff() UnitDiffSpec
- func (m *Unit) Init() error
- func (m *Unit) LoadState(spec interface{}, modKey string, p *project.StateProject) error
- func (m *Unit) Output() (string, error)
- func (m *Unit) Plan() error
- func (m *Unit) ReadConfig(spec map[string]interface{}, stack *project.Stack) error
- func (m *Unit) RemoteStatesScanner(data reflect.Value, unit project.Unit) (reflect.Value, error)
- func (m *Unit) ReplaceMarkers() error
- func (m *Unit) ReplaceRemoteStatesForDiff(in, out interface{}) error
- type UnitDiffSpec
Constants ¶
const RemoteStateMarkerCatName = "RemoteStateMarkers"
RemoteStateMarkerCatName - name of markers category for remote states
Variables ¶
This section is empty.
Functions ¶
func DependencyToBashRemoteState ¶
func DependencyToBashRemoteState(dep *project.DependencyOutput) (remoteStateRef string)
func DependencyToRemoteStateRef ¶
func DependencyToRemoteStateRef(dep *project.DependencyOutput) (remoteStateRef string)
func StringRemStScanner ¶
StringRemStScanner scan state data for outputs markers and replaces them for placeholders with remote state ref like <remoteState "stack.unit.output" >
func TerraformJSONParser ¶
TerraformJSONParser parse in (expected JSON string) and stores it in the value pointed to by out.
Types ¶
type Factory ¶
type Factory struct { }
Factory factory for s3 backends.
func (*Factory) NewFromState ¶
func (f *Factory) NewFromState(spec map[string]interface{}, modKey string, p *project.StateProject) (project.Unit, error)
NewFromState creates new unit from state data.
type RequiredProvider ¶
type TerraformTemplateDriver ¶
type TerraformTemplateDriver struct { }
func (*TerraformTemplateDriver) AddTemplateFunctions ¶
func (d *TerraformTemplateDriver) AddTemplateFunctions(p *project.Project)
func (*TerraformTemplateDriver) Name ¶
func (m *TerraformTemplateDriver) Name() string
type Unit ¶
type Unit struct { common.Unit StatePtr *Unit `yaml:"-" json:"-"` Providers interface{} `yaml:"-" json:"providers,omitempty"` RequiredProviders map[string]RequiredProvider `yaml:"-" json:"required_providers,omitempty"` Initted bool `yaml:"-" json:"-"` // True if unit was initted in this session. }
Unit describe cluster.dev unit to deploy/destroy terraform modules.
func NewEmptyUnit ¶
func NewEmptyUnit() Unit
func (*Unit) AddRequiredProvider ¶
func (*Unit) GetDiffData ¶
func (m *Unit) GetDiffData() interface{}
func (*Unit) GetStateDiffData ¶
func (m *Unit) GetStateDiffData() interface{}
func (*Unit) GetTemplateDriver ¶
func (m *Unit) GetTemplateDriver() (string, project.TemplateDriver)
GetTemplateDriver return template driver to add template functions into the project.
func (*Unit) GetUnitDiff ¶
func (m *Unit) GetUnitDiff() UnitDiffSpec
func (*Unit) LoadState ¶
func (m *Unit) LoadState(spec interface{}, modKey string, p *project.StateProject) error
func (*Unit) ReadConfig ¶
func (*Unit) RemoteStatesScanner ¶
RemoteStatesScanner - project scanner function, witch process dependencies markers in unit data setted by AddRemoteStateMarker template function.
func (*Unit) ReplaceMarkers ¶
ReplaceMarkers replace all templated markers with values.
func (*Unit) ReplaceRemoteStatesForDiff ¶
ReplaceRemoteStatesForDiff replace remote state markers in struct to <remote state stack.mod.output> to show in diff.
type UnitDiffSpec ¶
type UnitDiffSpec struct { // BackendName string `json:"backend_name"` common.UnitDiffSpec Providers interface{} `json:"providers,omitempty"` }