-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Google provider latest version 4.42.0 is crashing #12917
Google provider latest version 4.42.0 is crashing #12917
Comments
The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled. Stack trace from the terraform-provider-google_v4.42.0_x5.exe plugin: panic: runtime error: invalid memory address or nil pointer dereference |
@msahu-onramp Thanks for filing the issue. Would you mind sharing your config and debug logs so that I can take a look and reproduce the error? Thanks! |
We are seeing this issue too in all kinds of root modules, pretty much everywhere we are using 4.42.0 is crashing right now. We are trying to reproduce as something sharable |
Can confirm same error with cascading
Stack Trace:
|
So far, I have seen the issue with the following resources:
There doesn't appear to be any consistency with it though, we have a bunch of very similar root modules that are working fine. |
Thanks for the feedback! Can anyone please share a Terraform configuration file that run into this issue or any steps I should follow to reproduce this error? |
Found a way to reproduce it with the following config: locals {
lifecycle_rules = [
{
action = "Delete"
}
]
}
resource "google_storage_bucket" "bucket" {
name = "test-bucket-creation-foobar"
location = "US"
uniform_bucket_level_access = true
dynamic "lifecycle_rule" {
for_each = local.lifecycle_rules
content {
action {
type = lifecycle_rule.value.action
}
condition {
days_since_noncurrent_time = 7
}
}
}
}
terraform {
required_providers {
google = {
version = "4.37.0"
}
}
} Steps:
|
Thanks @joe-a-t! I'm able to reproduce the error. I was trying creating the bucket with version |
yeah, real fun one to reproduce, I had to go down to 3.90.0 then hop my way up to get the magic version number |
Similar issue here. Pinning the provider to 4.41.0 makes it work. Error during terraform plan:
|
Can the fix get merged and a new release cut today? |
Will there be a release with this fix in it? |
The fix just got merged and will be targeting the next release 4.43.0 (potentially next Monday). Pinning the provider to version 4.41.0 should prevent from crashing for now. |
Any way we could do a 4.42.1 or something in the next day since this is a crash? |
Thank you for the quick fix @shuyama1! I'll second what joe commented. This is causing widespread crashes for us so a quicker release would be much appreciated. |
@joe-a-t @paulspiegel |
Preparing |
|
I had same issue with Cloud Run, Cloud Functions and Spanner database. can any one help me on this? |
@krishnakanth810 Would you mind filing a new issue with the Terraform configs that run into the error as well as the debug logs? Thank you! |
@krishnakanth810 have you upgraded to provider 4.42.1? |
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. |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Stack trace from the terraform-provider-google_v4.42.0_x5 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x24dcb65]
goroutine 1154 [running]:
github.com/hashicorp/terraform-provider-google/google.flattenBucketLifecycleRuleCondition(0xc000c03340)
github.com/hashicorp/terraform-provider-google/google/resource_storage_bucket.go:1083 +0x45
github.com/hashicorp/terraform-provider-google/google.flattenBucketLifecycle(0xc00159b400)
github.com/hashicorp/terraform-provider-google/google/resource_storage_bucket.go:1067 +0x276
github.com/hashicorp/terraform-provider-google/google.setStorageBucket(0x2d59a8b?, 0x44?, 0xc0004b9dc0, {0xc0007c2cc0, 0x1c}, {0xc0003c6150, 0x65})
github.com/hashicorp/terraform-provider-google/google/resource_storage_bucket.go:1493 +0xf51
github.com/hashicorp/terraform-provider-google/google.resourceStorageBucketRead(0x7ff5b8a53d58?, {0x2cccd40?, 0xc000147000})
github.com/hashicorp/terraform-provider-google/google/resource_storage_bucket.go:732 +0x3a7
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x3232400?, {0x3232400?, 0xc00111efc0?}, 0xd?, {0x2cccd40?, 0xc000147000?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:712 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000c9b0a0, {0x3232400, 0xc00111efc0}, 0xc000718820, {0x2cccd40, 0xc000147000})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1015 +0x585
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000cba3c0, {0x3232400?, 0xc00111ef00?}, 0xc000566580)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:613 +0x497
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc00045e320, {0x3232400?, 0xc00111e8d0?}, 0xc0008539e0)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:747 +0x41e
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x2c5f7e0?, 0xc00045e320}, {0x3232400, 0xc00111e8d0}, 0xc000df90a0, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000001e0, {0x32377e8, 0xc00070a680}, 0xc000e6ab40, 0xc000cb2de0, 0x4387e30, 0x0)
google.golang.org/[email protected]/server.go:1340 +0xd13
google.golang.org/grpc.(*Server).handleStream(0xc0000001e0, {0x32377e8, 0xc00070a680}, 0xc000e6ab40, 0x0)
google.golang.org/[email protected]/server.go:1713 +0xa1b
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/[email protected]/server.go:965 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:963 +0x28a
Error: The terraform-provider-google_v4.42.0_x5 plugin crashed!
This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: