pulumi / pulumi-azure

A Microsoft Azure Pulumi resource package, providing multi-language access to Azure
Apache License 2.0
133 stars 51 forks source link

expected the subdomain type to be "queue" but got "table" #1884

Open t0yv0 opened 3 months ago

t0yv0 commented 3 months ago

What happened?

Upgrading the provider to https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v3.96.0 caused failures in TestAccQueue and is currently blocked:

expected the subdomain type to be "queue" but got "table"

Example

Minimal example:

import * as azure from "@pulumi/azure";

const resourceGroup = new azure.core.ResourceGroup("resourcegroup");

// Create a storage account for our queues
const storageAccount = new azure.storage.Account("storage", {
    resourceGroupName: resourceGroup.name,
    accountReplicationType: "LRS",
    accountTier: "Standard",
});

// And an input queue to send messages into
const queue1 = new azure.storage.Queue("queue1", {
   storageAccountName: storageAccount.name,
});

Output of pulumi about

N/A

Additional context

Debugging this a little further, the error comes out of this function:

func ParseQueueID(input, domainSuffix string) (*QueueId, error) {

https://github.com/tombuildsstuff/giovanni/blob/master/storage/2023-11-03/queue/queues/resource_id.go#L50

During the repro it is called with

input="https://storagef21629c2.table.core.windows.net/queue1bf1fc755"
domainSuffix="core.windows.net"

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

t0yv0 commented 3 months ago
    goroutine 30 [running]:
    runtime/debug.Stack()
        /nix/store/brv7d6mlrclkzywf1vaf35wqhq4c0c82-go-1.21.5/share/go/src/runtime/debug/stack.go:24 +0x5e
    github.com/tombuildsstuff/giovanni/storage/2023-11-03/queue/queues.ParseQueueID({0xc001e80380, 0x3d}, {0x9a140ca, 0x10})
        /Users/t0yv0/code/giovanni/storage/2023-11-03/queue/queues/resource_id.go:63 +0x91
    github.com/hashicorp/terraform-provider-azurerm/internal/services/storage.resourceStorageQueueUpdate(0xc00053ff80, {0x8944700?, 0xc000101680})
        /Users/t0yv0/code/pulumi-azure/upstream/internal/services/storage/storage_queue_resource.go:133 +0x186
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xa3327e0?, {0xa3327e0?, 0xc001d54a80?}, 0xd?, {0x8944700?, 0xc000101680?})
        /Users/t0yv0/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20240229143312-4f60ee4e2975/helper/schema/resource.go:805 +0x163
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc001fe8460, {0xa3327e0, 0xc001d54a80}, 0xc00184fad0, 0xc00053fd80, {0x8944700, 0xc000101680})
        /Users/t0yv0/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20240229143312-4f60ee4e2975/helper/schema/resource.go:924 +0x83a
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply({0xc00070e480?, {0x0?, 0x0?, 0x0?}}, {0xa3327e0, 0xc001d54a80}, {0x9a36fbf, 0x15}, {0xa332f48, 0xc0002aa138}, ...)
        /Users/t0yv0/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.77.0/pkg/tfshim/sdk-v2/provider.go:122 +0x176
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Update(0xc000133980, {0xa3327e0?, 0xc001d54630?}, 0xc000338900)
        /Users/t0yv0/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.77.0/pkg/tfbridge/provider.go:1274 +0xbee
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler.func1({0xa3327e0, 0xc001d54630}, {0x95065e0?, 0xc000338900})
        /Users/t0yv0/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.108.1/proto/go/provider_grpc.pb.go:629 +0x75
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0xa3327e0, 0xc001d54240}, {0x95065e0, 0xc000338900}, 0xc0018eec00, 0xc0005702b8)
        /Users/t0yv0/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x3d0
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler({0x9703500?, 0xc000133980}, {0xa3327e0, 0xc001d54240}, 0xc000492000, 0xc00161a480)
        /Users/t0yv0/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.108.1/proto/go/provider_grpc.pb.go:631 +0x135
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003ee800, {0xa3327e0, 0xc001d541b0}, {0xa35e760, 0xc000682d00}, 0xc002e76000, 0xc0019334d0, 0x11a937f0, 0x0)
        /Users/t0yv0/go/pkg/mod/google.golang.org/grpc@v1.62.0/server.go:1383 +0xe03
    google.golang.org/grpc.(*Server).handleStream(0xc0003ee800, {0xa35e760, 0xc000682d00}, 0xc002e76000)
        /Users/t0yv0/go/pkg/mod/google.golang.org/grpc@v1.62.0/server.go:1794 +0x100c
    google.golang.org/grpc.(*Server).serveStreams.func2.1()
        /Users/t0yv0/go/pkg/mod/google.golang.org/grpc@v1.62.0/server.go:1027 +0x8b
    created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 88
        /Users/t0yv0/go/pkg/mod/google.golang.org/grpc@v1.62.0/server.go:1038 +0x135
guineveresaenger commented 3 months ago

This is an upstream issue that was fixed and will go out with the next release.