pulumi-azure-native icon indicating copy to clipboard operation
pulumi-azure-native copied to clipboard

BlobServiceProperties requires explicit blobServicesName: "default" parameter despite documentation indicating it's optional

Open ajwtech opened this issue 8 months ago • 2 comments

What happened?

while adding blob service properties to a storage account I get an error message:

Diagnostics: azure-native:storage:BlobServiceProperties (blob-service-properties) error: Status=404 Code="HttpResourceNotFound" Message="The request url https://management.azure.com/subscriptions/[secret]/resourceGroups/[resGroup]/providers/Microsoft.Storage/storageAccounts/[secret]/blobServices/blob-service-properties?api-version=2022-09-01 is not found."

Example

blobServicesName must be set explicitly. without it, the code below will not work. This may just be because of the api-version im using but either way is still broken since it is an optional property of blobservicesproperties

export const blobServiceProperties = new azure_native.storage.BlobServiceProperties("blob-service-properties", {
    accountName: storageAccount.name,
    resourceGroupName: ResourceGroup.name,  
    blobServicesName: "default",
    cors: {
        corsRules: [
            {
                allowedOrigins: allowedOrigins,
                allowedMethods: ["GET", "HEAD", "OPTIONS"],
                allowedHeaders: ["*"],
                exposedHeaders: ["Content-Length", "Content-Type", "Content-Disposition", "Content-MD5"],
                maxAgeInSeconds: 3600
            }
        ]
    },
}, 

Output of pulumi about

CLI Version 3.153.1 Go Version go1.23.6 Go Compiler gc

Plugins KIND NAME VERSION resource azure 6.18.0 resource azure-native 2.84.0 resource cloudflare 5.49.0 resource command 1.0.1 resource docker-build 0.0.8 language nodejs 3.153.1 resource random 4.17.0

Host OS Microsoft Windows 11 Pro Version 10.0.26100 Build 26100 Arch x86_64

Additional context

No response

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).

ajwtech avatar Mar 13 '25 02:03 ajwtech

Thanks @ajwtech for the report and for the workaround. We'll add this to our backlog.

EronWright avatar Mar 14 '25 23:03 EronWright

I think this is similar case https://github.com/pulumi/pulumi-azure-native/issues/3960. policyId: 'policy' in ApiOperationPolicy and also managementPolicyName: 'default' in storage.ManagementPolicy

otahirs avatar Mar 17 '25 11:03 otahirs