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 show crashes when state file is locked #31430

Closed
jojje opened this issue Jul 12, 2022 · 3 comments · Fixed by #31444
Closed

terraform show crashes when state file is locked #31430

jojje opened this issue Jul 12, 2022 · 3 comments · Fixed by #31444
Labels
bug new new issue not yet triaged

Comments

@jojje
Copy link

jojje commented Jul 12, 2022

Terraform Version

v1.2.4

Terraform Configuration Files

provider "null" {}

Debug Output

gist

Expected Behavior

The state/plan should have been shown, or an error message about the state file being locked should have been displayed.

Actual Behavior

Golang process panicked (crashed)

Steps to Reproduce

  1. terraform init
  2. terraform console (in another terminal, but in the same directory)
  3. terraform show

Additional Context

None

References

None

@jojje jojje added bug new new issue not yet triaged labels Jul 12, 2022
@jojje jojje changed the title terraform show crashes when when state file is locked terraform show crashes when state file is locked Jul 12, 2022
@crw
Copy link
Collaborator

crw commented Jul 13, 2022

Thanks for this report.

@kmoe
Copy link
Member

kmoe commented Jul 15, 2022

Thanks for this. I was able to reproduce this on Linux by creating a state file with invalid JSON.
In general, this crash will appear whenever Terraform is unable to access the latest state snapshot for whatever reason: the file could be corrupt, unparseable as JSON, inaccessible, etc.

Fixed by #31444.

@github-actions
Copy link

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 Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug new new issue not yet triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants