Documentation ¶
Index ¶
- Constants
- func DependencyToBashRemoteState(dep *project.ULinkT) (remoteStateRef string)
- func DependencyToRemoteStateRef(dep *project.ULinkT) (remoteStateRef string)
- func StringRemStScanner(data reflect.Value, unit project.Unit) (reflect.Value, error)
- func TerraformJSONParser(in string, out *project.UnitLinksT) error
- type Factory
- type RequiredProvider
- type TerraformTemplateDriver
- type Unit
- func (u *Unit) AddRequiredProvider(name, source, version string)
- func (u *Unit) Apply() error
- func (u *Unit) Build() error
- func (u *Unit) Destroy() error
- func (u *Unit) GetDiffData() interface{}
- func (u *Unit) GetState() interface{}
- func (u *Unit) GetStateDiffData() interface{}
- func (u *Unit) GetStateUnit() *Unit
- func (u *Unit) GetTemplateDriver() (string, project.TemplateDriver)
- func (u *Unit) GetUnitDiff() UnitDiffSpec
- func (u *Unit) Init() error
- func (u *Unit) LoadState(spec interface{}, modKey string, p *project.StateProject) error
- func (u *Unit) Output() (string, error)
- func (u *Unit) Plan() error
- func (u *Unit) ReadConfig(spec map[string]interface{}, stack *project.Stack) error
- func (u *Unit) RemoteStatesScanner(data reflect.Value, unit project.Unit) (reflect.Value, error)
- func (u *Unit) ReplaceRemoteStatesForDiff(in, out interface{}) error
- type UnitDiffSpec
Constants ¶
const RemoteStateLinkType = "RemoteStateMarkers"
RemoteStateLinkType - name of markers category for remote states
Variables ¶
This section is empty.
Functions ¶
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 ¶
func TerraformJSONParser(in string, out *project.UnitLinksT) error
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 (*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"` InitDone bool `yaml:"-" json:"-"` // True if unit was initted in this session. StateData interface{} `yaml:"-" json:"-"` }
Unit describe cluster.dev unit to deploy/destroy terraform modules.
func NewEmptyUnit ¶
func NewEmptyUnit() *Unit
func (*Unit) AddRequiredProvider ¶
func (*Unit) GetDiffData ¶
func (u *Unit) GetDiffData() interface{}
func (*Unit) GetStateDiffData ¶
func (u *Unit) GetStateDiffData() interface{}
func (*Unit) GetStateUnit ¶
func (*Unit) GetTemplateDriver ¶
func (u *Unit) GetTemplateDriver() (string, project.TemplateDriver)
GetTemplateDriver return template driver to add template functions into the project.
func (*Unit) GetUnitDiff ¶
func (u *Unit) GetUnitDiff() UnitDiffSpec
func (*Unit) LoadState ¶
func (u *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) 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"` }