Documentation
¶
Index ¶
- Variables
- func CopyFileFunc(src, dst string) (err error)
- func GetTerraformCLIVars(exec config.StepExecution) map[string]interface{}
- func GetTerraformEnvVars(exec config.StepExecution) map[string]string
- func HandleDeployOverrides(logger *logrus.Entry, execDir string, deploymentRing string)
- func HandleDestroyOverrides(logger *logrus.Entry, execDir string, deploymentRing string)
- func KeysString(m map[string]config.Account) string
- type TFBackendParser
- type TFBackendType
- type TerraformBackend
- type TerraformPlugin
- type TerraformStepper
- func (stepper TerraformStepper) ExecuteStep(exec config.StepExecution) config.StepOutput
- func (stepper TerraformStepper) ExecuteStepDestroy(exec config.StepExecution) config.StepOutput
- func (stepper TerraformStepper) ExecuteStepTests(exec config.StepExecution) (output config.StepTestOutput)
- func (stepper TerraformStepper) PreExecute(exec config.StepExecution) (config.StepExecution, error)
Constants ¶
This section is empty.
Variables ¶
var CopyFile = CopyFileFunc
Functions ¶
func CopyFileFunc ¶
CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherise, attempt to create a hard link between the two files. If that fail, copy the file contents from src to dst.
func GetTerraformCLIVars ¶
func GetTerraformCLIVars(exec config.StepExecution) map[string]interface{}
func GetTerraformEnvVars ¶
func GetTerraformEnvVars(exec config.StepExecution) map[string]string
func HandleDeployOverrides ¶
HandleDeployOverrides copy deploy override configurations into the execution working directory
func HandleDestroyOverrides ¶
HandleDestroyOverrides copy destroy override configurations into the execution working directory
Types ¶
type TFBackendParser ¶
TFBackendParser is a function type that handles parsing a backend.tf file
type TFBackendType ¶
type TFBackendType int
TFBackendType represents a Terraform backend type
const ( // S3Backend backend S3Backend TFBackendType = iota // Azure Storage Account backend AzureStorageAccount // Google Cloud Storage backend GCSBackend // LocalBackend backend LocalBackend // UnknownBackend represents an unknown backend UnknownBackend )
func StringToBackendType ¶
func StringToBackendType(s string) (TFBackendType, error)
StringToBackendType converts a string to a ProviderType
func (TFBackendType) String ¶
func (b TFBackendType) String() string
type TerraformBackend ¶
type TerraformBackend struct { Type TFBackendType Key string S3RoleArn string S3Bucket string AZUResourceGroupName string AZUStorageAccountName string GCSBucket string GCSPrefix string Path string Config map[string]interface{} }
TerraformBackend is a structure that represents a terraform backend file
func GetBackendConfig ¶
func GetBackendConfig(exec config.StepExecution, backendParser TFBackendParser) TerraformBackend
GetBackendConfig parses a backend.tf file TODO, replace this with a cleaner hcl2json2struct merge where backend.tf configurations take priority over defined defaults here
func ParseTFBackend ¶
ParseTFBackend parses a backend.tf file
type TerraformPlugin ¶
type TerraformPlugin struct{}
func (TerraformPlugin) Initialize ¶
func (info TerraformPlugin) Initialize(logger *logrus.Entry)
type TerraformStepper ¶
type TerraformStepper struct{}
func (TerraformStepper) ExecuteStep ¶
func (stepper TerraformStepper) ExecuteStep(exec config.StepExecution) config.StepOutput
ExecuteStep deploys a step
func (TerraformStepper) ExecuteStepDestroy ¶
func (stepper TerraformStepper) ExecuteStepDestroy(exec config.StepExecution) config.StepOutput
ExecuteStepDestroy destroys a step
func (TerraformStepper) ExecuteStepTests ¶
func (stepper TerraformStepper) ExecuteStepTests(exec config.StepExecution) (output config.StepTestOutput)
ExecuteStepTests executes the tests for a step
func (TerraformStepper) PreExecute ¶
func (stepper TerraformStepper) PreExecute(exec config.StepExecution) (config.StepExecution, error)