pulumi / pulumi-azure

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

Storage containers replacing after upgrade #2660

Open scottmack111 opened 1 day ago

scottmack111 commented 1 day ago

Describe what happened

After upgrading from from 5.89.0 to 6.9.0 im trying to clear out some of our deprecation warnings.

When updating my azure.storage.Container resources to use storageAccountId instead of storageAccountName its causing a replacement of the resource

Sample program

Replace

storageAccountName: StorageAccount.name

With

storageAccountId: StorageAccount.id

Log output

        "diffReasons": [
            "storageAccountId",
            "storageAccountName"
        ],
        "replaceReasons": [
            "storageAccountId",
            "storageAccountName"
        ],
        "detailedDiff": {
            "storageAccountId": {
                "kind": "add-replace",
                "inputDiff": false
            },
            "storageAccountName": {
                "kind": "delete-replace",
                "inputDiff": false
            }
        }

Affected Resource(s)

azure.storage.Container

Output of pulumi about

CLI Version 3.139.0 Go Version go1.23.3 Go Compiler gc

Plugins KIND NAME VERSION resource azure 6.9.0 resource azuread 6.0.1 resource kubernetes 4.18.3 language nodejs unknown resource random 4.16.7

Host OS Microsoft Windows 11 Pro Version 10.0.22631 Build 22631 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).

thomas11 commented 9 hours ago

Hi @scottmack111, do you get any deprecation warning about storageAccountName in v5.89? If yes, please fix it while on v5, then upgrade to v6.

In case you haven't seen it, there's an Azure Classic v6 Migration Guide.