Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApplyExecutionParameters ¶
type ApplyExecutionParameters struct {
ExecutionParameters
}
type ExecutionParameters ¶
type ExecutionParameters struct { ModuleNames []string UserVars *UserVariables TerraformParameters []string }
func NoExecutionParameters ¶
func NoExecutionParameters() ExecutionParameters
type MissingRequiredVarsError ¶
type MissingRequiredVarsError struct {
// contains filtered or unexported fields
}
MissingRequiredVarsError is an error type that is returned from plan or apply when there are variables that need to be provided at run time that are missing.
func (MissingRequiredVarsError) Error ¶
func (e MissingRequiredVarsError) Error() string
Error is the error message, so this satisfies the error interface.
func (MissingRequiredVarsError) MissingVars ¶
func (e MissingRequiredVarsError) MissingVars() []string
MissingVars returns a list of the missing user variables.
type Option ¶
Option is an option for the c that allows for changing of options or dependency injection for testing.
func WithConfig ¶
WithConfig allows you to pass project config.
type PlanExecutionParameters ¶
type PlanExecutionParameters struct { ExecutionParameters Detach bool }
func NoPlanExecutionParameters ¶
func NoPlanExecutionParameters() PlanExecutionParameters
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
Project is a collection of Terraform modules, based on configuration.
Modules may be invoked with various parameters, which are either provided by the user at runtime, or predefined in configuration.
The combination of a module, along with a map of variable values, is called an "execution".
Executions can have dependencies between each other (again, defined in the configuration). Based on dependencies, all modules can be planned or applied concurrently.
func NewProject ¶
NewProject returns a new instance of Project.
func NewProjectFromConfigFile ¶
NewProjectFromConfigFile creates a new Project based on the specified config file.
func NewProjectFromYAML ¶
NewProjectFromYAML creates a new Project based on the specified YAML config.
func (*Project) Apply ¶
func (c *Project) Apply(parameters ApplyExecutionParameters) (<-chan string, <-chan *Result, error)
Apply does a Terraform apply for every possible execution, in parallel, taking into consideration dependencies. It returns an error if it is unable to start, e.g. due to a missing required variable.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result is what is returned from astro execution.
func (*Result) TerraformResult ¶
TerraformResult is the result of the Terraform command, or nil if there wasn't one.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is a directory containing log output, Terraform state files and plans.
type SessionRepo ¶
type SessionRepo struct {
// contains filtered or unexported fields
}
SessionRepo is a parent directory that contains inidividual project sessions.
func NewSessionRepo ¶
func NewSessionRepo(project *Project, repoPath string, idGenFunc func() string) (*SessionRepo, error)
NewSessionRepo creates or opens a project session repo.
func (*SessionRepo) Current ¶
func (r *SessionRepo) Current() (*Session, error)
Current returns the last session created, or creates one if it's the first time it's called.
func (*SessionRepo) NewSession ¶
func (r *SessionRepo) NewSession() (*Session, error)
NewSession creates a new session in the repository.
type UserVariables ¶
type UserVariables struct { // Values is the set of all values specified by the user via custom command line flags Values map[string]string // Filters is the subset of values that act as module filters, as described by the README Filters map[string]bool }
UserVariables holds the values provided by the user via custom command line flags
func NoUserVariables ¶
func NoUserVariables() *UserVariables
NoUserVariables returns an empty UserVariables value, used by tests
func (*UserVariables) FilterCount ¶
func (uv *UserVariables) FilterCount() int
FilterCount returns the number of module filters
func (*UserVariables) HasFilter ¶
func (uv *UserVariables) HasFilter(name string) bool
HasFilter is true when name is acting as a module filter
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cli
|
|
astro/cmd
Package cmd contains the source for the `astro` command line tool that operators use to interact with the project.
|
Package cmd contains the source for the `astro` command line tool that operators use to interact with the project. |
Package conf contains structs that are used to represent the configuration of a project.
|
Package conf contains structs that are used to represent the configuration of a project. |
Package tvm stands for Terraform version manager.
|
Package tvm stands for Terraform version manager. |