Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
Hey, I just wanted to highlight the following issue #30129 (fixed with #30142) seems to apply to more backends than just the "remote". In my case I had an issue in with my "pg" backend.
This flow is quite widely used when running terraform in automation where it might not make sense to init the "default" workspace (e.g. due to permissions issues).
The symptoms are the same as in the original issue. Running terraform init in any new workspace (specified by TF_WORKSPACE or .terraform/environment) will result in:
Error: Failed to select workspace
and a subsequent terraform workspace new will result in:
Backend initialization required, please run "terraform init"
Hey, I just wanted to highlight the following issue #30129 (fixed with #30142) seems to apply to more backends than just the "remote". In my case I had an issue in with my "pg" backend.
This flow is quite widely used when running terraform in automation where it might not make sense to init the "default" workspace (e.g. due to permissions issues).
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
Actual Behavior
Steps to Reproduce
The symptoms are the same as in the original issue. Running
terraform init
in any new workspace (specified by TF_WORKSPACE or .terraform/environment) will result in:and a subsequent
terraform workspace new
will result in:The only difference would be the config.
Additional Context
References