-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
0.12.24 panic: runtime error: index out of range #24824
Comments
Hi @arcotek-ltd! Thanks for reporting this. This sure looks like a valid issue. The challenge here is that it doesn't look like an easy one to reproduce. It looks to me like this is a multi-step reproduction, where we first need get state into the error condition. My next step, to get this to an engineer, is that I need to reproduce it on our end. To do that, I have to be able to run this and run it on my workstation without inventing any details in order to be confident we're seeing the same behavior. As-is, I don't have a very clearreproduction case, and so I'm stuck. I also wanted to clarify two things. First, are you running this on Windows? It looked like it from your crash log. Second, are you using azure for state storage? What would be most helpful for me is if you can restate your reproduction case such that I can copy-paste it and run it locally. Ideally, this would use the null resource provider rather than a real provider in order to minimize external dependencies. In this case, it looks like the azurerm state backend is needed and I'm happy to use our azure test env for that. Is that reproduction case something you can help with? |
Hi @danieldreier, Now the hard bit, I totally understand you need to reproduce this, however, I'm not sure how I can use the null resource to simulate this. It would be much easier for me if I gave you access to my repos or a zip file. Would this be possible? Thanks. |
We can use some kind of azure resources if null resources are prohibitive. I'm flexible there. My main goal is to get a very simple to run reproduction case, listed step by step. I'm trying to triage issues into a state where they are ready to go for an engineer to pick up and work without a lot of figuring out of context. If your codebase pretty much plugs in some azure credentials, and you can tell me what to run in what order, then sharing a zip or a codebase might be sufficient. Most infrastructure code isn't that clean and simple, so if we're going to build a large infrastructure that might become prohibitive. |
It only deploys a storage account and automation account, but there are countless files for the resources and the modules. That will give you all the files and all you should have to do is run How do I share the zip file with just you? Thanks |
@arcotek-ltd I appreciate your willingness to share all that stuff, but a reproduction case involving countless files for resources is just too much context to dig through. We have to narrow this down further into a smaller reproduction case. Are you seeing this with every run now? Are you able to consistently reproduce this given your current state and code? |
This looks an awful lot like #23677. Both are running in Azure DevOps and produce the same error from
|
Terraform v0.13 includes a fix to the HCL JSON parser where it was panicking on certain types of syntax error. I'm not certain that the error we see here is the same bug that hashicorp/hcl#358 addressed, but I think it'd be good to re-test this on v0.13.0 once it's released, or (if you can reproduce it with only The fact that the crash is coming from the HCL JSON parser means that this is very likely to be related to something in a |
I am going to close this issue due to inactivity. If you are still experiencing this issue in terraform v0.13, please open a new issue and fill out the issue template so we can take another look. If you have a question, I recommend the the community forum, where there are far more people available to help. Thanks! |
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. |
Terraform Version
Terraform Configuration Files
<product>.tfvars.json
:Debug Output
Crash Output
crash.log
Expected Behavior
Deploy modules to Azure automation account.
Actual Behavior
Crash.
Steps to Reproduce
terraform plan
.There is a lot more to this deployment, that I cannot share publically, however, I'm happy to share with a Hashicorp dev.
If I empty out the modules array (
modules : []
) in<product>.tfvars.json
, thenplan
works, however, this will remove installed PowerShell modules.The TF module that processes the
modules: []
section isazurerm_automation_modules
which was working fine. I had a bug in my code for another TF module that creates storage account containers:I added
container_key
to the for loop and theid
attribute which is when I started getting the crash, however backing out the change doesn't stop the crash.I've deleted
.terraform
directory several times.I've tried with 0.12.23 and 0.12.24.
Additional Context
References
The text was updated successfully, but these errors were encountered: