-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 Crash (v0.12.18) #5287
Comments
@weeco Can't repro on my side. Could you post your plan result and full debug log when this happens? Thanks |
This was fixed in v3.2.0 in #5094. @edwardmedia fyi the way I was able to figure this out was by looking at the crash.log file. Since it was a crash, there is likely to be a panic in the logs, so I looked for it and found this:
This shows that there's a line in the provider that is trying to convert a variable to a map, but it can't do that because it's nil, so we need to do a nil check. Since we know what version of the provider is being used and what file and line number it's on (resource_cloud_run_service.go:1946), we can go and figure out exactly where the nil check needs to be: https://github.com/terraform-providers/terraform-provider-google/blob/v3.0.0/google/resource_cloud_run_service.go#L1946. Now, if we take a look at the current version, we can see that the nil check is there: https://github.com/terraform-providers/terraform-provider-google/blob/master/google/resource_cloud_run_service.go#L1971. From there, I used the blame view in GitHub to figure out which PR it was added in, and the CHANGELOG to figure out which release that PR appeared in. Let me know if you have any questions about that process! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
This issue was originally opened by @weeco as hashicorp/terraform#23744. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform Configuration Files
Debug Output
Crash Output
crash.log
Expected Behavior
Terraform plan looked good (it showed one cloud run service to add) but the apply crashed.
Actual Behavior
Terraform crash after trying to apply the changes.
Steps to Reproduce
Additional Context
I tried applying this to two different Google Projects but the crash happened on both of them (I targeted them one by one by using the
--target
parameter).One project already had the cloudrun service running which is why I imported the state. I saw terraform is crashing so I thought it might be because of some import / state issues. I removed the resource from my terraform module which caused the cloud run service to be deleted (as expected) and that worked. Adding the cloud run service however doesn't work because of the described crash.
References
The text was updated successfully, but these errors were encountered: