You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
We got the following error in terraform plan.
Stack trace from the terraform-provider-azurerm_v3.91.0_x5 plugin:
panic: Error reading level state: strconv.ParseInt: parsing "9223372036854776000": value out of range
goroutine 146 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).get(0xc00369aa00, {0xc002cc3aa0, 0x1, 0x1}, 0x8?)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource_data.go:556 +0x333
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).State(0xc00369aa00)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource_data.go:354 +0x473
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).ShimInstanceStateFromValue(0xc0010ce1c0, {{{0x94e3278?, 0xc001bca438?}}, {0x7d6a4c0?, 0xc002cda210?}})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:670 +0x1d8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000b826d8, {0x94e07d0?, 0xc002cb98f0?}, 0xc00366c940)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/grpc_provider.go:623 +0x1f3
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc0013972c0, {0x94e07d0?, 0xc002cb8f30?}, 0xc00012d7a0)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/tf5server/server.go:789 +0x48b
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x888f940?, 0xc0013972c0}, {0x94e07d0, 0xc002cb8f30}, 0xc0006de070, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:431 +0x169
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002ae1e0, {0x9507500, 0xc001b00680}, 0xc002ccc000, 0xc001a86c30, 0xf038e68, 0x0)
google.golang.org/grpc@v1.58.3/server.go:1374 +0xde7
google.golang.org/grpc.(*Server).handleStream(0xc0002ae1e0, {0x9507500, 0xc001b00680}, 0xc002ccc000, 0x0)
google.golang.org/grpc@v1.58.3/server.go:1751 +0x9e7
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/grpc@v1.58.3/server.go:986 +0xbb
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 55
google.golang.org/grpc@v1.58.3/server.go:997 +0x145
Error: The terraform-provider-azurerm_v3.91.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 itcan be fixed. The output above should help diagnose the issue.2024-09-18T04:01:06.988Z [DEBUG] provider: plugin exitedWe found 9223372036854776000 is from one imported eventhub resource, which is created from azure portal with infinite retention time enabled. Here is the state file details. { "index_key": "<index_key>", "schema_version": 0, "attributes": { "capture_description": [], "id": "<id>", "message_retention": 9223372036854776000, "name": "<name>", "namespace_name": "<namespace_name>", "partition_count": 1, "partition_ids": [ "0" ], "resource_group_name": "<resource_group_name>", "status": "Active", "timeouts": null }, "sensitive_attributes": [], "private": "<private>" }Also from provider document, maximum value of message_retention is 7 days, could be related to the error.https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/eventhub#message_retention
Expected Behaviour
After imported the infinite retention time eventhub resource, no error should occur during terraform plan.
Actual Behaviour
provider plugin crashed.
Steps to Reproduce
create an eventhub with Infinite retention time enabled from azure portal
terraform import the resource
terrafrom plan
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
Hi @yueshao37 thanks for opening this issue. I would like to explain that Terraform performs CRUD management on Azure resources based on Azure Rest API. According to the API definition, the type of messageRetentionInDays is int64, and the maximum value of int64 should usually be 9223372036854775807. However, the 9223372036854776000 returned by the API is greater than 9223372036854775807. This is the root cause of the crash. Therefore, it is recommended to contact Microsoft Support to solve the problem of inconsistency between the API definition and the actual situation.
In addition, the crash occurred in terraform-plugin-sdk instead of terraform-provider-azurerm.
Is there an existing issue for this?
Community Note
Terraform Version
1.7.5
AzureRM Provider Version
3.91.0
Affected Resource(s)/Data Source(s)
terraform-provider-azurerm_v3.91.0_x5, azurerm_eventhub
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
After imported the infinite retention time eventhub resource, no error should occur during terraform plan.
Actual Behaviour
provider plugin crashed.
Steps to Reproduce
create an eventhub with Infinite retention time enabled from azure portal
terraform import the resource
terrafrom plan
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: