Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform init doesn't honour input=false or automation flags for invalid workspace #29800

Closed
dennisroche opened this issue Oct 23, 2021 · 3 comments · Fixed by #29805
Closed
Assignees
Labels
bug confirmed a Terraform Core team member has reproduced this issue v1.0 Issues (primarily bugs) reported against v1.0 releases

Comments

@dennisroche
Copy link

Terraform Version

Terraform v1.0.9

Expected Behavior

terraform init -input=false (or TF_IN_AUTOMATION=1 set) command should fail outright if it doesn't have enough information to proceed

Actual Behavior

terraform init was stuck waiting on input/workspace selection until the CICD build timed out.

Steps to Reproduce

export TF_IN_AUTOMATION=true
export TF_WORKSPACE=DOES_NOT_EXIST
terraform init -input=false

Additional Context

Running terraform using the GitHub action hashicorp/setup-terraform@v1 which has a built-in wrapper.

References

Discussed in #21393 but was closed without resolution as reported against terraform 0.11.x.

That issue went on a tangent about defaulting the selection (a bad idea - #21393 (comment)) and then further on to automatic creation of workspace.

@dennisroche dennisroche added bug new new issue not yet triaged labels Oct 23, 2021
@alisdair alisdair added backend/remote confirmed a Terraform Core team member has reproduced this issue v1.0 Issues (primarily bugs) reported against v1.0 releases and removed backend/remote new new issue not yet triaged labels Oct 25, 2021
@alisdair alisdair self-assigned this Oct 25, 2021
@alisdair
Copy link
Contributor

Thanks for reporting this! I can confirm this behaviour is a bug.

@alisdair
Copy link
Contributor

The fix for this has been merged into the v1.0 branch and will go out with the next patch release. Thanks for reporting!

@github-actions
Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug confirmed a Terraform Core team member has reproduced this issue v1.0 Issues (primarily bugs) reported against v1.0 releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants