Hello, I'm upgrading from `@pulumi/azure` v4 to v...
# azure
g
Hello, I'm upgrading from
@pulumi/azure
v4 to v5 and I'm running into a panic from the terraform provider:
Copy code
panic: interface conversion: interface {} is nil, not []interface {}
    goroutine 88 [running]:
    <http://github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/migration.KubernetesClusterV1ToV2.UpgradeFunc.func1({0x7ae1400|github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/migration.KubernetesClusterV1ToV2.UpgradeFunc.func1({0x7ae1400>?, 0xc00040cf90?}, 0x669bb80?, {0xc002184990?, 0x7ae1400?})
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-provider-azurerm@v1.41.1-0.20230214191339-39b1d1d475ad/internal/services/containers/migration/kubernetes_cluster.go:1231 +0x2fe
    <http://github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk.StateUpgrades.func1({0x7adef78|github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk.StateUpgrades.func1({0x7adef78>, 0xc000138028}, 0x2?, {0x6622f40, 0xc00041dc00})
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-provider-azurerm@v1.41.1-0.20230214191339-39b1d1d475ad/internal/tf/pluginsdk/state_upgrades.go:52 +0x64
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.UpgradeJSONState({0x7adef78|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.UpgradeJSONState({0x7adef78>, 0xc000138028}, 0x0?, 0xc001480d80?, 0xc000efc2a0?, {0x6622f40, 0xc00041dc00})
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20220824175045-450992f2f5b9/helper/schema/grpc_provider.go:449 +0xa7
I searched the slack archive and found 2 other people mention it but no followup solutions 1. https://archive.pulumi.com/t/8205008/Hey-all-We-recently-updated-azure-classic-golang-from-v4-to- 2. https://archive.pulumi.com/t/2751297/Hi-All-Please-help-When-upgrading-pulumi-azure-from-4-to-5-I I can't find the corresponding version of the code in
<http://github.com/pulumi/terraform-provider-azurerm|github.com/pulumi/terraform-provider-azurerm>
because there's no
v1.41.1
tag and that number seems wrong (in the logs) given v5 of the
@pulumi/azure
package is using the provider at version
5.35.0
If I look at the code for
5.35.0
then it seems like there's a nil reference issue on this line of code: https://github.com/pulumi/terraform-provider-azurerm/blob/upstream-v3.35.0/internal/services/containers/migration/kubernetes_cluster.go#L1231 In my pulumi state i have the following under the state outputs for my cluster
Copy code
"roleBasedAccessControl": {
                        "azureActiveDirectory": null,
                        "enabled": true
                    },
And verbose pulumi output shows that it's being passed as a terraform input to the provider
Copy code
I0508 15:44:02.523773 1459043 log.go:75] eventSink::Infoerr(<{%reset%}>I0508 15:44:02.523744 1459133 schema.go:492] Created Terraform input: role_based_access_control = map[enabled:true]
I also tried removing the field from the state file and attempting to preview on that but it still fails with the same panic on the same line. Has anyone else hit this issue and know the solution?