Documentation ¶
Index ¶
- func Clone(name string, storageRepoURL string, fs afero.Fs, deploymentPath string) error
- func Create(name string, storageRepoURL string, codeRepoURL string, codeRepoPath string, ...) error
- type CTD
- type Deployment
- type DeploymentImpl
- func (d *DeploymentImpl) CodeRepoPath() string
- func (d *DeploymentImpl) CodeRepoURL() string
- func (d *DeploymentImpl) GenerateVariablesGlobal() ([]string, error)
- func (d *DeploymentImpl) GenerateVariablesUser(user string) ([]string, error)
- func (d *DeploymentImpl) GenerateWorkdirGlobal() (string, error)
- func (d *DeploymentImpl) GenerateWorkdirUser(user string) (string, error)
- func (d *DeploymentImpl) Purge() error
- func (d *DeploymentImpl) StateFilePathGlobal() string
- func (d *DeploymentImpl) StateFilePathUser(user string) string
- func (d *DeploymentImpl) TerraformVersion() string
- type Metadata
- type State
- type VTD
- type Vars
- type Workdir
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CTD ¶
CTD represents a Code Tree Definition
func (*CTD) ListMainGlobalFiles ¶
ListMainGlobalFiles returns all TF files from the global main folder
func (*CTD) ListMainUserFiles ¶
ListMainUserFiles returns all TF files from the user main folder
func (*CTD) ListModules ¶
ListModules returns all modules defined on a CTD
type Deployment ¶
type Deployment interface { GenerateWorkdirGlobal() (string, error) GenerateWorkdirUser(user string) (string, error) GenerateVariablesGlobal() ([]string, error) GenerateVariablesUser(user string) ([]string, error) StateFilePathGlobal() string StateFilePathUser(user string) string TerraformVersion() string CodeRepoURL() string CodeRepoPath() string Purge() error }
Deployment object contains all information about a deployment TODO: improve explanation and interface definition
type DeploymentImpl ¶
type DeploymentImpl struct { Name string State *State Vars *Vars Base *CTD Plugins [](*CTD) // The key is the plugin name Workdir *Workdir // contains filtered or unexported fields }
DeploymentImpl implements Deployment interface
func (*DeploymentImpl) CodeRepoPath ¶
func (d *DeploymentImpl) CodeRepoPath() string
CodeRepoPath returns the path inside the CodeRepo where is the terraform code that describes infrastructure to be deployed in a sonatina way.
func (*DeploymentImpl) CodeRepoURL ¶
func (d *DeploymentImpl) CodeRepoURL() string
CodeRepoURL returns the URL where is the terraform code that describes infrastructure to be deployed in a sonatina way.
func (*DeploymentImpl) GenerateVariablesGlobal ¶
func (d *DeploymentImpl) GenerateVariablesGlobal() ([]string, error)
func (*DeploymentImpl) GenerateVariablesUser ¶
func (d *DeploymentImpl) GenerateVariablesUser(user string) ([]string, error)
func (*DeploymentImpl) GenerateWorkdirGlobal ¶
func (d *DeploymentImpl) GenerateWorkdirGlobal() (string, error)
GenerateWorkdirGlobal combines deployment CTDs (main and plugins) to generate the CTD to be applied by terraform. Returns main path where terraform must be executed.
func (*DeploymentImpl) GenerateWorkdirUser ¶
func (d *DeploymentImpl) GenerateWorkdirUser(user string) (string, error)
GenerateWorkdirUser combines deployment CTDs (main and plugins) to generate the CTD to be applied by terraform
func (*DeploymentImpl) Purge ¶
func (d *DeploymentImpl) Purge() error
Purge removes all local files related to a deployment
func (*DeploymentImpl) StateFilePathGlobal ¶
func (d *DeploymentImpl) StateFilePathGlobal() string
func (*DeploymentImpl) StateFilePathUser ¶
func (d *DeploymentImpl) StateFilePathUser(user string) string
func (*DeploymentImpl) TerraformVersion ¶
func (d *DeploymentImpl) TerraformVersion() string
TerraformVersion returns the terraform version that is being using with this specific deployment.
type Metadata ¶
type Metadata struct { TerraformVersion string `json:"terraform_version"` Repo string `json:"repo"` RepoPath string `json:"repo_path"` Version string `json:"version"` Commit string `json:"commit"` Flavour string `json:"flavour"` UserComponents map[string]userComponent `json:"user_components"` Plugins []globalPlugin `json:"plugins"` // contains filtered or unexported fields }
func (*Metadata) ListGlobalPlugins ¶
func (*Metadata) ListUserPlugins ¶
type State ¶
type State struct { RepoURL string // contains filtered or unexported fields }
State manages terraform state
func (*State) FilePathGlobal ¶
func (*State) FilePathUser ¶
type Vars ¶
Vars manage variable and metadata
func (*Vars) GenerateGlobal ¶
GenerateGlobal generates vars files to be used on terraform operations. Returns a list of vars files that must be applied in order.