Documentation ¶
Overview ¶
Package terraform initializes an engine that execute terraform commands and generate terraform code. It only deals with interfaces describing what terraform should do, and not the specific implementation. Each version of terraform should have its own implementation, or reuse older one if no changes are made to file format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine struct { Version string Compatibility def.VersionCompatibility Generator def.Generator Executor def.Executor }
Engine that can process version specific terraform commands
func (*Engine) CreateOverrides ¶
func (e *Engine) CreateOverrides(file *loader.ParsedFile) error
CreateOverrides create the tau_override file in module folder. This file will overide backend settings
func (*Engine) ResolveDependencies ¶
func (e *Engine) ResolveDependencies(file *loader.ParsedFile) (bool, error)
ResolveDependencies processes the source file and generates terraform modules for each unique source. For each source it will generate output arguments and return the merged values
Bool return value indicates if it successfully resolved the dependency and should proceed to create source. If it failed to resolve dependencies but error is nil, it should not proceed to create this source, but should also not fail application. That generally means that it was a problem resolving dependencies for this source only. Other sources can still be generated.
func (*Engine) WriteInputVariables ¶
func (e *Engine) WriteInputVariables(file *loader.ParsedFile) error
WriteInputVariables write the terraform.tfvars file into module folder. This file is the parsed and processed variables where all dependencies and data source have been resolved and replaced with real values