Versions in this module Expand all Collapse all v0 v0.3.0 Sep 23, 2022 v0.2.0 Sep 23, 2022 Changes in this version + const DefaultErrorExitCode + const DefaultSuccessExitCode + const TerraformPlanChangesPresentExitCode + var DefaultRetryableTerraformErrors = map[string]string + var PlanFilePathRequired = fmt.Errorf("You must set PlanFilePath on options struct to use this function.") + var TerraformCommandsWithLockSupport = []string + var TerraformCommandsWithPlanFileSupport = []string + func Apply(t testing.TestingT, options *Options) string + func ApplyAndIdempotent(t testing.TestingT, options *Options) string + func ApplyAndIdempotentE(t testing.TestingT, options *Options) (string, error) + func ApplyE(t testing.TestingT, options *Options) (string, error) + func AssertPlannedValuesMapKeyExists(t testing.TestingT, plan *PlanStruct, keyQuery string) + func AssertResourceChangesMapKeyExists(t testing.TestingT, plan *PlanStruct, keyQuery string) + func Destroy(t testing.TestingT, options *Options) string + func DestroyE(t testing.TestingT, options *Options) (string, error) + func FormatArgs(options *Options, args ...string) []string + func FormatTerraformArgs(argName string, args []string) []string + func FormatTerraformBackendConfigAsArgs(vars map[string]interface{}) []string + func FormatTerraformLockAsArgs(lockCheck bool, lockTimeout string) []string + func FormatTerraformPlanFileAsArg(commandType string, outPath string) []string + func FormatTerraformPluginDirAsArgs(pluginDir string) []string + func FormatTerraformVarsAsArgs(vars map[string]interface{}) []string + func Get(t testing.TestingT, options *Options) string + func GetAllVariablesFromVarFile(t testing.TestingT, fileName string, out interface{}) + func GetAllVariablesFromVarFileE(t testing.TestingT, fileName string, out interface{}) error + func GetE(t testing.TestingT, options *Options) (string, error) + func GetExitCodeForTerraformCommand(t testing.TestingT, additionalOptions *Options, args ...string) int + func GetExitCodeForTerraformCommandE(t testing.TestingT, additionalOptions *Options, additionalArgs ...string) (int, error) + func GetVariableAsListFromVarFile(t testing.TestingT, fileName string, key string) []string + func GetVariableAsListFromVarFileE(t testing.TestingT, fileName string, key string) ([]string, error) + func GetVariableAsMapFromVarFile(t testing.TestingT, fileName string, key string) map[string]string + func GetVariableAsMapFromVarFileE(t testing.TestingT, fileName string, key string) (map[string]string, error) + func GetVariableAsStringFromVarFile(t testing.TestingT, fileName string, key string) string + func GetVariableAsStringFromVarFileE(t testing.TestingT, fileName string, key string) (string, error) + func HCLFileToJSONFile(hclPath, jsonOutPath string) error + func Init(t testing.TestingT, options *Options) string + func InitAndApply(t testing.TestingT, options *Options) string + func InitAndApplyAndIdempotent(t testing.TestingT, options *Options) string + func InitAndApplyAndIdempotentE(t testing.TestingT, options *Options) (string, error) + func InitAndApplyE(t testing.TestingT, options *Options) (string, error) + func InitAndPlan(t testing.TestingT, options *Options) string + func InitAndPlanAndShow(t testing.TestingT, options *Options) string + func InitAndPlanAndShowE(t testing.TestingT, options *Options) (string, error) + func InitAndPlanE(t testing.TestingT, options *Options) (string, error) + func InitAndPlanWithExitCode(t testing.TestingT, options *Options) int + func InitAndPlanWithExitCodeE(t testing.TestingT, options *Options) (int, error) + func InitAndValidate(t testing.TestingT, options *Options) string + func InitAndValidateE(t testing.TestingT, options *Options) (string, error) + func InitAndValidateInputs(t testing.TestingT, options *Options) string + func InitAndValidateInputsE(t testing.TestingT, options *Options) (string, error) + func InitE(t testing.TestingT, options *Options) (string, error) + func OPAEval(t testing.TestingT, tfOptions *Options, opaEvalOptions *opa.EvalOptions, ...) + func OPAEvalE(t testing.TestingT, tfOptions *Options, opaEvalOptions *opa.EvalOptions, ...) error + func Output(t testing.TestingT, options *Options, key string) string + func OutputAll(t testing.TestingT, options *Options) map[string]interface + func OutputAllE(t testing.TestingT, options *Options) (map[string]interface{}, error) + func OutputE(t testing.TestingT, options *Options, key string) (string, error) + func OutputForKeys(t testing.TestingT, options *Options, keys []string) map[string]interface + func OutputForKeysE(t testing.TestingT, options *Options, keys []string) (map[string]interface{}, error) + func OutputJson(t testing.TestingT, options *Options, key string) string + func OutputJsonE(t testing.TestingT, options *Options, key string) (string, error) + func OutputList(t testing.TestingT, options *Options, key string) []string + func OutputListE(t testing.TestingT, options *Options, key string) ([]string, error) + func OutputListOfObjects(t testing.TestingT, options *Options, key string) []map[string]interface + func OutputListOfObjectsE(t testing.TestingT, options *Options, key string) ([]map[string]interface{}, error) + func OutputMap(t testing.TestingT, options *Options, key string) map[string]string + func OutputMapE(t testing.TestingT, options *Options, key string) (map[string]string, error) + func OutputMapOfObjects(t testing.TestingT, options *Options, key string) map[string]interface + func OutputMapOfObjectsE(t testing.TestingT, options *Options, key string) (map[string]interface{}, error) + func OutputRequired(t testing.TestingT, options *Options, key string) string + func OutputRequiredE(t testing.TestingT, options *Options, key string) (string, error) + func OutputStruct(t testing.TestingT, options *Options, key string, v interface{}) + func OutputStructE(t testing.TestingT, options *Options, key string, v interface{}) error + func Plan(t testing.TestingT, options *Options) string + func PlanE(t testing.TestingT, options *Options) (string, error) + func PlanExitCode(t testing.TestingT, options *Options) int + func PlanExitCodeE(t testing.TestingT, options *Options) (int, error) + func RequirePlannedValuesMapKeyExists(t testing.TestingT, plan *PlanStruct, keyQuery string) + func RequireResourceChangesMapKeyExists(t testing.TestingT, plan *PlanStruct, keyQuery string) + func RunTerraformCommand(t testing.TestingT, additionalOptions *Options, args ...string) string + func RunTerraformCommandAndGetStdoutE(t testing.TestingT, additionalOptions *Options, additionalArgs ...string) (string, error) + func RunTerraformCommandE(t testing.TestingT, additionalOptions *Options, additionalArgs ...string) (string, error) + func Show(t testing.TestingT, options *Options) string + func ShowE(t testing.TestingT, options *Options) (string, error) + func TgApplyAll(t testing.TestingT, options *Options) string + func TgApplyAllE(t testing.TestingT, options *Options) (string, error) + func TgDestroyAll(t testing.TestingT, options *Options) string + func TgDestroyAllE(t testing.TestingT, options *Options) (string, error) + func TgPlanAllExitCode(t testing.TestingT, options *Options) int + func TgPlanAllExitCodeE(t testing.TestingT, options *Options) (int, error) + func Validate(t testing.TestingT, options *Options) string + func ValidateE(t testing.TestingT, options *Options) (string, error) + func ValidateInputs(t testing.TestingT, options *Options) string + func ValidateInputsE(t testing.TestingT, options *Options) (string, error) + func WorkspaceDelete(t testing.TestingT, options *Options, name string) string + func WorkspaceDeleteE(t testing.TestingT, options *Options, name string) (string, error) + func WorkspaceSelectOrNew(t testing.TestingT, options *Options, name string) string + func WorkspaceSelectOrNewE(t testing.TestingT, options *Options, name string) (string, error) + type CtyJsonOutput struct + Type interface{} + Value map[string]interface{} + type EmptyOutput string + func (outputName EmptyOutput) Error() string + type InputFileKeyNotFound struct + FilePath string + Key string + func (err InputFileKeyNotFound) Error() string + type Options struct + BackendConfig map[string]interface{} + EnvVars map[string]string + Lock bool + LockTimeout string + Logger *logger.Logger + MaxRetries int + MigrateState bool + NoColor bool + NoStderr bool + OutputMaxLineSize int + Parallelism int + PlanFilePath string + PluginDir string + Reconfigure bool + RetryableTerraformErrors map[string]string + SshAgent *ssh.SshAgent + Targets []string + TerraformBinary string + TerraformDir string + TimeBetweenRetries time.Duration + Upgrade bool + VarFiles []string + Vars map[string]interface{} + func GetCommonOptions(options *Options, args ...string) (*Options, []string) + func WithDefaultRetryableErrors(t testing.TestingT, originalOptions *Options) *Options + func (options *Options) Clone() (*Options, error) + type OutputKeyNotFound string + func (err OutputKeyNotFound) Error() string + type OutputValueNotList struct + Value interface{} + func (err OutputValueNotList) Error() string + type OutputValueNotMap struct + Value interface{} + func (err OutputValueNotMap) Error() string + type PanicWhileParsingVarFile struct + ConfigFile string + RecoveredValue interface{} + func (err PanicWhileParsingVarFile) Error() string + type PlanStruct struct + RawPlan tfjson.Plan + ResourceChangesMap map[string]*tfjson.ResourceChange + ResourcePlannedValuesMap map[string]*tfjson.StateResource + func InitAndPlanAndShowWithStruct(t testing.TestingT, options *Options) *PlanStruct + func InitAndPlanAndShowWithStructE(t testing.TestingT, options *Options) (*PlanStruct, error) + func InitAndPlanAndShowWithStructNoLogTempPlanFile(t testing.TestingT, options *Options) *PlanStruct + func ShowWithStruct(t testing.TestingT, options *Options) *PlanStruct + func ShowWithStructE(t testing.TestingT, options *Options) (*PlanStruct, error) + type ResourceCount struct + Add int + Change int + Destroy int + func GetResourceCount(t testing.TestingT, cmdout string) *ResourceCount + func GetResourceCountE(t testing.TestingT, cmdout string) (*ResourceCount, error) + type TgInvalidBinary string + func (err TgInvalidBinary) Error() string + type UnexpectedOutputType struct + ActualType string + ExpectedType string + Key string + func (err UnexpectedOutputType) Error() string + type UnsupportedDefaultWorkspaceDeletion struct + func (err *UnsupportedDefaultWorkspaceDeletion) Error() string + type VarFileNotFound struct + Path string + func (err VarFileNotFound) Error() string + type WorkspaceDoesNotExist string + func (err WorkspaceDoesNotExist) Error() string