Closed manishaDinithiH closed 2 months ago
i tried version 4.0.0 and that works fine
I get the exact same error (4.0.1 worked fine).
Stack trace from the terraform-provider-azurerm_v4.1.0_x5.exe plugin:
panic: interface conversion: interface {} is []interface {}, not string
goroutine 583 [running]:
github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/migration.(*CosmosDBAccountV0toV1).UpgradeFunc.CosmosDBAccountV0toV1.UpgradeFunc.func1({0x0?, 0x0?}, 0x0?, {0x0?, 0x0?})
github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/migration/cosmosdb_account.go:560 +0xf0
github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk.StateUpgrades.func1({0x876f058, 0xc003cd7020}, 0x0?, {0x6efa4e0, 0xc001d6e000})
github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk/state_upgrades.go:55 +0x5e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).upgradeJSONState(0xc000c90378, {0x876f058, 0xc003cd7020}, 0xd?, 0x7f7ebd0?, 0x14?)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:491 +0x75
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).UpgradeResourceState(0xc000c90378, {0x876f058?, 0xc003cd6f30?}, 0xc003bc0f60)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:367 +0x3fa
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).UpgradeResourceState(0x876f090?, {0x876f058?, 0xc003cd6c30?}, 0xc003bc0f60)
github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_UpgradeResourceState.go:36 +0x1a2
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).UpgradeResourceState(0xc001c16320, {0x876f058?, 0xc003cd64e0?}, 0xc003caca50)
github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:750 +0x27b
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_UpgradeResourceState_Handler({0x7c1c020?, 0xc001c16320}, {0x876f058, 0xc003cd64e0}, 0xc002d2f280, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:446 +0x16c
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001f7000, {0x876f058, 0xc003cd6450}, {0x879ba40, 0xc000274600}, 0xc003cd2900, 0xc001354480, 0xddecab8, 0x0)
google.golang.org/grpc@v1.63.2/server.go:1369 +0xe23
google.golang.org/grpc.(*Server).handleStream(0xc0001f7000, {0x879ba40, 0xc000274600}, 0xc003cd2900)
google.golang.org/grpc@v1.63.2/server.go:1780 +0x1016
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.63.2/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 83
google.golang.org/grpc@v1.63.2/server.go:1030 +0x135
Error: The terraform-provider-azurerm_v4.1.0_x5.exe 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.
You can workaround the issue by terraform state rm
followed by terraform import
the azurerm_cosmosdb_account
resources.
while upgrade from 4.0.1
to 4.1.0
to fix ip_range_filter
bug #27208, I am facing the same issue.
Workaround as mentioned by @lra terraform state rm
then terraform import
works.
Migrating from 3.116.0
to 4.1.0
directly do not see this issue.
I get the exact same error (4.0.1 worked fine).
Stack trace from the terraform-provider-azurerm_v4.1.0_x5.exe plugin: panic: interface conversion: interface {} is []interface {}, not string goroutine 583 [running]: github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/migration.(*CosmosDBAccountV0toV1).UpgradeFunc.CosmosDBAccountV0toV1.UpgradeFunc.func1({0x0?, 0x0?}, 0x0?, {0x0?, 0x0?}) github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/migration/cosmosdb_account.go:560 +0xf0 github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk.StateUpgrades.func1({0x876f058, 0xc003cd7020}, 0x0?, {0x6efa4e0, 0xc001d6e000}) github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk/state_upgrades.go:55 +0x5e github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).upgradeJSONState(0xc000c90378, {0x876f058, 0xc003cd7020}, 0xd?, 0x7f7ebd0?, 0x14?) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:491 +0x75 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).UpgradeResourceState(0xc000c90378, {0x876f058?, 0xc003cd6f30?}, 0xc003bc0f60) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:367 +0x3fa github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).UpgradeResourceState(0x876f090?, {0x876f058?, 0xc003cd6c30?}, 0xc003bc0f60) github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_UpgradeResourceState.go:36 +0x1a2 github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).UpgradeResourceState(0xc001c16320, {0x876f058?, 0xc003cd64e0?}, 0xc003caca50) github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:750 +0x27b github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_UpgradeResourceState_Handler({0x7c1c020?, 0xc001c16320}, {0x876f058, 0xc003cd64e0}, 0xc002d2f280, 0x0) github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:446 +0x16c google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001f7000, {0x876f058, 0xc003cd6450}, {0x879ba40, 0xc000274600}, 0xc003cd2900, 0xc001354480, 0xddecab8, 0x0) google.golang.org/grpc@v1.63.2/server.go:1369 +0xe23 google.golang.org/grpc.(*Server).handleStream(0xc0001f7000, {0x879ba40, 0xc000274600}, 0xc003cd2900) google.golang.org/grpc@v1.63.2/server.go:1780 +0x1016 google.golang.org/grpc.(*Server).serveStreams.func2.1() google.golang.org/grpc@v1.63.2/server.go:1019 +0x8b created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 83 google.golang.org/grpc@v1.63.2/server.go:1030 +0x135 Error: The terraform-provider-azurerm_v4.1.0_x5.exe 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.
We have the same issue. I updated my provider version to not allow 4.1.0 to bypass till this is fixed.
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.112.0, < 4.1.0 "
}
}
backend "azurerm" { # Required for the Azure YAML Pipeline Task - TerraformTaskV4@4 to operate
}
}
Hi,
we have also ran into this, but with much more resource types. Here is a list of unique resource type & error combinations (and honestly, I'd very much appriciate not being forced to remove and import all of these resources across all of our states):
Error: Plugin did not respond
with azurerm_resource_group.webhooks,
on <obfuscated .tf file> line 321, in resource "azurerm_resource_group" "webhooks":
321: resource "azurerm_resource_group" "webhooks" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ValidateResourceConfig call. The plugin logs may
contain more details.
Error: Plugin did not respond
with azurerm_resource_group.common,
on <obfuscated .tf file> line 17, in resource "azurerm_resource_group" "common":
17: resource "azurerm_resource_group" "common" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with azurerm_cognitive_account.open_ai_account_v3[0],
on <obfuscated .tf file> line 146, in resource "azurerm_cognitive_account" "open_ai_account_v3":
146: resource "azurerm_cognitive_account" "open_ai_account_v3" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with module.data_migrations[0].azurerm_virtual_network.vnet,
on <obfuscated .tf file> line 15, in resource "azurerm_virtual_network" "vnet":
15: resource "azurerm_virtual_network" "vnet" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with module.data_migrations[0].azurerm_public_ip.public_ip,
on <obfuscated .tf file> line 30, in resource "azurerm_public_ip" "public_ip":
30: resource "azurerm_public_ip" "public_ip" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with module.data_migrations[0].azurerm_network_security_group.network_sercurity_group,
on <obfuscated .tf file> line 38, in resource "azurerm_network_security_group" "network_sercurity_group":
38: resource "azurerm_network_security_group" "network_sercurity_group" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with module.durable_tasks_plan[0].azurerm_service_plan.plan,
on <obfuscated .tf file> line 1, in resource "azurerm_service_plan" "plan":
1: resource "azurerm_service_plan" "plan" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).UpgradeResourceState call. The plugin logs may contain
more details.
Error: Plugin did not respond
with module.azure_functions_plan[0].azurerm_service_plan.plan,
on <obfuscated .tf file> line 1, in resource "azurerm_service_plan" "plan":
1: resource "azurerm_service_plan" "plan" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with module.cosmosdb.azurerm_cosmosdb_account.cosmosdb_account,
on <obfuscated .tf file> line 22, in resource "azurerm_cosmosdb_account" "cosmosdb_account":
22: resource "azurerm_cosmosdb_account" "cosmosdb_account" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).UpgradeResourceState call. The plugin logs may contain
more details.
Error: Plugin did not respond
with module.cosmosdb_data_explorer_connection.data.azurerm_subscription.current,
on <obfuscated .tf file> line 14, in data "azurerm_subscription" "current":
14: data "azurerm_subscription" "current" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with module.event_hub[0].azurerm_eventhub_namespace.default,
on <obfuscated .tf file> line 17, in resource "azurerm_eventhub_namespace" "default":
17: resource "azurerm_eventhub_namespace" "default" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with module.event_hub.azurerm_eventhub_namespace.default,
on <obfuscated .tf file> line 17, in resource "azurerm_eventhub_namespace" "default":
17: resource "azurerm_eventhub_namespace" "default" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).UpgradeResourceState call. The plugin logs may contain
more details.
Error: Plugin did not respond
with module.key_vault.azurerm_key_vault.vault,
on <obfuscated .tf file> line 3, in resource "azurerm_key_vault" "vault":
3: resource "azurerm_key_vault" "vault" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with module.service_bus.azurerm_servicebus_namespace.default,
on <obfuscated .tf file> line 1, in resource "azurerm_servicebus_namespace" "default":
1: resource "azurerm_servicebus_namespace" "default" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).UpgradeResourceState call. The plugin logs may contain
more details.
Error: Plugin did not respond
with module.ai_service_storage.azurerm_storage_account.storage_account,
on <obfuscated .tf file> line 20, in resource "azurerm_storage_account" "storage_account":
20: resource "azurerm_storage_account" "storage_account" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with module.reactive_preview.azurerm_storage_account.storage_account,
on <obfuscated .tf file> line 20, in resource "azurerm_storage_account" "storage_account":
20: resource "azurerm_storage_account" "storage_account" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).UpgradeResourceState call. The plugin logs may contain
more details.
Error: Plugin did not respond
with module.key_vault.azurerm_key_vault_access_policy.app_service_permission[0],
on <obfuscated .tf file> line 33, in resource "azurerm_key_vault_access_policy" "app_service_permission":
33: resource "azurerm_key_vault_access_policy" "app_service_permission" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with module.data_migrations[0].azurerm_subnet.subnet,
on <obfuscated .tf file> line 22, in resource "azurerm_subnet" "subnet":
22: resource "azurerm_subnet" "subnet" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Plugin did not respond
with azurerm_application_insights.webtests,
on <obfuscated .tf file> line 18, in resource "azurerm_application_insights" "webtests":
18: resource "azurerm_application_insights" "webtests" {
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.
Error: Request cancelled
with azurerm_cognitive_deployment.open_ai_deployment_v3[0],
on <obfuscated .tf file> line 155, in resource "azurerm_cognitive_deployment" "open_ai_deployment_v3":
155: resource "azurerm_cognitive_deployment" "open_ai_deployment_v3" {
The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.
Error: Request cancelled
with module.webjob_monitor[0].azurerm_logic_app_workflow.logic_app,
on <obfuscated .tf file> line 13, in resource "azurerm_logic_app_workflow" "logic_app":
13: resource "azurerm_logic_app_workflow" "logic_app" {
The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.
Error: Request cancelled
with module.webjob_monitor[0].module.table_connection.data.azurerm_managed_api.type,
on <obfuscated .tf file> line 1, in data "azurerm_managed_api" "type":
1: data "azurerm_managed_api" "type" {
The plugin.(*GRPCProvider).ValidateDataResourceConfig request was cancelled.
Stack trace from the terraform-provider-azurerm_v4.1.0_x5.exe plugin:
panic: interface conversion: interface {} is []interface {}, not string
goroutine 951 [running]:
github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/migration.(*CosmosDBAccountV0toV1).UpgradeFunc.CosmosDBAccountV0toV1.UpgradeFunc.func1({0x0?, 0x0?}, 0x0?, {0x0?, 0x0?})
github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/migration/cosmosdb_account.go:560 +0xf0
github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk.StateUpgrades.func1({0x906f058, 0xc0049aa120}, 0x0?, {0x77fa4e0, 0xc002100480})
github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk/state_upgrades.go:55 +0x5e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).upgradeJSONState(0xc000687710, {0x906f058, 0xc0049aa120}, 0xd?, 0x887ebd0?, 0x14?)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:491 +0x75
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).UpgradeResourceState(0xc000687710, {0x906f058?, 0xc0049aa030?}, 0xc0049da060)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:367 +0x3fa
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).UpgradeResourceState(0x906f090?, {0x906f058?, 0xc00494b050?}, 0xc0049da060)
github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_UpgradeResourceState.go:36 +0x1a2
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).UpgradeResourceState(0xc001977720, {0x906f058?, 0xc005386120?}, 0xc0024aa5a0)
github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:750 +0x27b
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_UpgradeResourceState_Handler({0x851c020?, 0xc001977720}, {0x906f058, 0xc005386120}, 0xc001cae880, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:446 +0x16c
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001f7000, {0x906f058, 0xc005386090}, {0x909ba40, 0xc000208300}, 0xc0028f1680, 0xc000f99920, 0xe6ecab8, 0x0)
google.golang.org/grpc@v1.63.2/server.go:1369 +0xe23
google.golang.org/grpc.(*Server).handleStream(0xc0001f7000, {0x909ba40, 0xc000208300}, 0xc0028f1680)
google.golang.org/grpc@v1.63.2/server.go:1780 +0x1016
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.63.2/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 38
google.golang.org/grpc@v1.63.2/server.go:1030 +0x135
Error: The terraform-provider-azurerm_v4.1.0_x5.exe 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.
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.
Is there an existing issue for this?
Community Note
Terraform Version
4.241.26
AzureRM Provider Version
4.1.0
Affected Resource(s)/Data Source(s)
azurerm_monitor_metric_alert, cosmos etc
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Just trying to delete these resources from azure and plan failed with above error. expected behaviour is plan showing resources to destroy
Actual Behaviour
plan failed
Steps to Reproduce
terraform plan
Important Factoids
No response
References
No response