Documentation
¶
Index ¶
- Constants
- func DependencyToBashRemoteState(dep *project.DependencyOutput) (remoteStateRef string)
- func DependencyToRemoteStateRef(dep *project.DependencyOutput) (remoteStateRef string)
- type RequiredProvider
- type StateCommon
- type StateDep
- type StateSpecCommon
- type StateSpecDiffCommon
- type TerraformTemplateDriver
- type Unit
- func (m *Unit) AddRequiredProvider(name, source, version string)
- func (m *Unit) Apply() error
- func (m *Unit) ApplyOutput() []byte
- func (m *Unit) Backend() project.Backend
- func (m *Unit) Build() error
- func (m *Unit) CodeDir() string
- func (m *Unit) CreateCodeDir() error
- func (m *Unit) Dependencies() *[]*project.DependencyOutput
- func (m *Unit) Destroy() error
- func (m *Unit) ExpectedOutputs() map[string]*project.DependencyOutput
- func (m *Unit) FilesList() map[string][]byte
- func (m *Unit) GetStateCommon() StateSpecCommon
- func (m *Unit) GetStateDiffCommon() StateSpecDiffCommon
- func (m *Unit) GetTemplateDriver() (string, project.TemplateDriver)
- func (m *Unit) Init() error
- func (m *Unit) Key() string
- func (m *Unit) LoadStateCommon(spec StateCommon, modKey string, p *project.StateProject) error
- func (m *Unit) Markers() map[string]interface{}
- func (m *Unit) Name() string
- func (m *Unit) Output() (string, error)
- func (m *Unit) Plan() error
- func (m *Unit) ProjectPtr() *project.Project
- 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(inheritedUnit project.Unit) error
- func (m *Unit) ReplaceRemoteStatesForDiff(in, out interface{}) error
- func (m *Unit) StackName() string
- func (m *Unit) StackPtr() *project.Stack
- func (m *Unit) UpdateProjectRuntimeData(p *project.Project) error
- func (m *Unit) WasApplied() bool
Constants ¶
const RemoteStateMarkerCatName = "RemoteStateMarkers"
RemoteStateMarkerCatName - name of markers category for remote states
Variables ¶
This section is empty.
Functions ¶
func DependencyToBashRemoteState ¶ added in v0.4.6
func DependencyToBashRemoteState(dep *project.DependencyOutput) (remoteStateRef string)
func DependencyToRemoteStateRef ¶ added in v0.4.6
func DependencyToRemoteStateRef(dep *project.DependencyOutput) (remoteStateRef string)
Types ¶
type RequiredProvider ¶
type StateCommon ¶
type StateCommon interface {
}
type StateSpecCommon ¶
type StateSpecCommon struct {
BackendName string `json:"backend_name"`
PreHook *hookSpec `json:"pre_hook,omitempty"`
PostHook *hookSpec `json:"post_hook,omitempty"`
Providers interface{} `json:"providers,omitempty"`
Markers map[string]interface{} `json:"markers,omitempty"`
Dependencies []StateDep `json:"dependencies,omitempty"`
RequiredProvider map[string]RequiredProvider `json:"required_providers,omitempty"`
Outputs map[string]bool `json:"outputs,omitempty"`
}
type StateSpecDiffCommon ¶
type TerraformTemplateDriver ¶
type TerraformTemplateDriver struct {
}
func (*TerraformTemplateDriver) AddTemplateFunctions ¶
func (m *TerraformTemplateDriver) AddTemplateFunctions(p *project.Project)
func (*TerraformTemplateDriver) Name ¶
func (m *TerraformTemplateDriver) Name() string
type Unit ¶ added in v0.5.0
type Unit struct {
// contains filtered or unexported fields
}
Unit describe cluster.dev unit to deploy/destroy terraform modules.
func (*Unit) AddRequiredProvider ¶ added in v0.5.0
func (*Unit) ApplyOutput ¶ added in v0.5.0
ApplyOutput return output of last unit applying.
func (*Unit) CreateCodeDir ¶ added in v0.5.0
CreateCodeDir generate all terraform code for project.
func (*Unit) Dependencies ¶ added in v0.5.0
func (m *Unit) Dependencies() *[]*project.DependencyOutput
Dependencies return slice of unit dependencies.
func (*Unit) ExpectedOutputs ¶ added in v0.5.0
func (m *Unit) ExpectedOutputs() map[string]*project.DependencyOutput
func (*Unit) GetStateCommon ¶ added in v0.5.0
func (m *Unit) GetStateCommon() StateSpecCommon
func (*Unit) GetStateDiffCommon ¶ added in v0.5.0
func (m *Unit) GetStateDiffCommon() StateSpecDiffCommon
func (*Unit) GetTemplateDriver ¶ added in v0.5.0
func (m *Unit) GetTemplateDriver() (string, project.TemplateDriver)
GetTemplateDriver return template driver to add template functions into the project.
func (*Unit) LoadStateCommon ¶ added in v0.5.0
func (m *Unit) LoadStateCommon(spec StateCommon, modKey string, p *project.StateProject) error
func (*Unit) ProjectPtr ¶ added in v0.5.0
ProjectPtr return ptr to unit project.
func (*Unit) ReadConfig ¶ added in v0.5.0
func (*Unit) RemoteStatesScanner ¶ added in v0.5.0
RemoteStatesScanner - project scanner function, witch process dependencies markers in unit data setted by AddRemoteStateMarker template function.
func (*Unit) ReplaceMarkers ¶ added in v0.5.0
ReplaceMarkers replace all templated markers with values.
func (*Unit) ReplaceRemoteStatesForDiff ¶ added in v0.5.0
ReplaceRemoteStatesForDiff replace remote state markers in struct to <remote state stack.mod.output> to show in diff.
func (*Unit) UpdateProjectRuntimeData ¶ added in v0.5.0
UpdateProjectRuntimeData update project runtime dataset, adds unit outputs.
func (*Unit) WasApplied ¶ added in v0.5.0
WasApplied return true if unit's method Apply was runned.