terraform_utils

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForSpecificErrors

func CheckForSpecificErrors(err TerraformError) (description string)

CheckForSpecificErrors

@brief:

CheckForSpecificErrors prints Terrap oriented error messages for pre-known errors

@params:

description - string - the new description message

func FindTfProviders

func FindTfProviders(dir string, main *workspace.Workspace) map[string]*version.Version

FindTfProviders

@brief: FindTfProviders

finds the Terraform providers in the given folder

@params:

dir - the folder to find the Terraform providers in

@returns:

the Terraform providers in the given folder

func InstallTf

func InstallTf() (execPath string, isTempVersion bool, tv string)

func IsTerraformInstalled

func IsTerraformInstalled() bool

func NewTerraformExecutor

func NewTerraformExecutor(dir string, execPath string) *tfexec.Terraform

NewTerraformExecutor

@brief: NewTerraformExecutor creates a new terraform executor

@params: dir - the directory to run terraform in

execPath - the path to the Terraform executable

@returns:

*tfexec.Terraform - the terraform executor

func RemoveTempTerraformExecutor

func RemoveTempTerraformExecutor(execPath string) error

RemoveTempTerraformExecutor

@brief:

RemoveTempTerraformExecutor deletes the Terraform executor received

@params:

execPath - string - the path to remove

@returns:

error - if exists, else nil

func TerraformErrorPrettyPrint

func TerraformErrorPrettyPrint(err error)

TerraformErrorPrettyPrint

@brief:

TerraformErrorPrettyPrint prints the terraform error given

@params:

err - error - the error to parse

func TerraformInit

func TerraformInit(dir string) (execPath string, isTempVersion bool, terraformToolVersion string, err error)

Types

type TerraformError

type TerraformError struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL