You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TerraformBinarystring// Name of the binary that will be used
TerraformDirstring// The path to the folder where the Terraform code is defined.
// The vars to pass to Terraform commands using the -var option. Note that terraform does not support passing `null`
// as a variable value through the command line. That is, if you use `map[string]interface{}{"foo": nil}` as `Vars`,
// this will translate to the string literal `"null"` being assigned to the variable `foo`. However, nulls in
// lists and maps/objects are supported. E.g., the following var will be set as expected (`{ bar = null }`:
// map[string]interface{}{
// "foo": map[string]interface{}{"bar": nil},
// }
Varsmap[string]interface{}
VarFiles []string// The var file paths to pass to Terraform commands using -var-file option.
Targets []string// The target resources to pass to the terraform command with -target
Lockbool// The lock option to pass to the terraform command with -lock
LockTimeoutstring// The lock timeout option to pass to the terraform command with -lock-timeout
EnvVarsmap[string]string// Environment variables to set when running Terraform
BackendConfigmap[string]interface{} // The vars to pass to the terraform init command for extra configuration for the backend
RetryableTerraformErrorsmap[string]string// If Terraform apply fails with one of these (transient) errors, retry. The keys are a regexp to match against the error and the message is what to display to a user if that error is matched.
MaxRetriesint// Maximum number of times to retry errors matching RetryableTerraformErrors
TimeBetweenRetries time.Duration// The amount of time to wait between retries
Upgradebool// Whether the -upgrade flag of the terraform init command should be set to true or not
NoColorbool// Whether the -no-color flag will be set for any Terraform command or not
SshAgent*ssh.SshAgent// Overrides local SSH agent with the given in-process agent
NoStderrbool// Disable stderr redirection
OutputMaxLineSizeint// The max size of one line in stdout and stderr (in bytes)
Logger*logger.Logger// Set a non-default logger that should be used. See the logger package for more info.
Parallelismint// Set the parallelism setting for Terraform
PlanFilePathstring// The path to output a plan file to (for the plan command) or read one from (for the apply command)
PluginDirstring// The path of downloaded plugins to pass to the terraform init command (-plugin-dir)
}
Terraform reconfigure makes easy to fix issues in the backend
Seems reasonable to add a new option for to configure it! We are a bit buried with other initiatives, so most likely won't get to implement this anytime soon, but happy to review a PR if you are up for it.
Since terraform v0.15.4 behavior on terraform init has changed. If init now encounters a change to the stored backend configuration, it will always return an error when neither -reconfigure or -migrate-state is supplied. This change was merged in hashicorp/terraform#28718 . PR to add this missing options has been raised see: #923
I didn't find a way or issue here mentioning a way to pass -reconfigure into TF init.
terratest/modules/terraform/options.go
Lines 40 to 71 in 09df87f
Terraform reconfigure makes easy to fix issues in the backend
https://www.terraform.io/docs/cli/commands/init.html#backend-initialization
The text was updated successfully, but these errors were encountered: