Terraform: Panic/crash when running 'terraform init -from-module=' when module contains another module

Created on 5 Oct 2019  ·  6Comments  ·  Source: hashicorp/terraform

Terraform Version: Terraform v0.12.9

Terraform Configuration Files

I've created a repo that contains a minimal example that triggers the crash:

Invoke repo with make crash or make nocrash

Debug Output

I'll assume the crash.log file below is sufficient.

Crash Output

Expected Behavior

terraform init -from-module=... should initialize without panic

Actual Behavior

panic.

Steps to Reproduce

run make crash in above linked example repo.

References

  • #21653
bug cli confirmed crash v0.12

Most helpful comment

I have reproduced this on 0.12.26 and 0.13.0 beta 1 using make crash. Thank you for the excellent reproduction case!

All 6 comments

https://github.com/hashicorp/terraform/issues/21653#issuecomment-500051495 (from Jun 7 2019):

… something about calling init -from-module=foo on a module foo that itself contains a module with source set to a relative path causes a crash.

this appears to still be true

/cc @pselle -- as they were involved in #21653

Duplicate #22973

I have reproduced this on 0.12.26 and 0.13.0 beta 1 using make crash. Thank you for the excellent reproduction case!

🎉 This has been fixed, and I managed to get it merged just in time for our next Terraform v0.13-beta release!

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.

Was this page helpful?
0 / 5 - 0 ratings