Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading from v4 to v5 causes storage accounts to be recreated #1593

Open
barclayadam opened this issue Jan 5, 2024 · 3 comments
Open

Upgrading from v4 to v5 causes storage accounts to be recreated #1593

barclayadam opened this issue Jan 5, 2024 · 3 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@barclayadam
Copy link

What happened?

Upgrading from 4.37.0 to ^5.60.0 has caused all storage accounts to require a replacement. I can see nothing that has changed in the output. The only diff in source is replacing allowPublicAccess with allowNestedItemsToBePublic as required.

The complete diff output in Pulumi web app shows no changes:

  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:uat-deploy-global::download-storage::pulumi:pulumi:Stack::download-storage-uat-deploy-global]
    > pulumi:pulumi:StackReference: (read)
        [id=symprex/cloudflare/uat-deploy-global]
        [urn=urn:pulumi:uat-deploy-global::download-storage::pulumi:pulumi:StackReference::symprex/cloudflare/uat-deploy-global]
        name: "symprex/cloudflare/uat-deploy-global"
error: unable to replace resource "urn:pulumi:uat-deploy-global::download-storage::azure:storage/account:Account::downloads-blob-store"
as it is currently marked for protection. To unprotect the resource, remove the `protect` flag from the resource in your Pulumi program and run `pulumi up`

I'm using the Automation API and have checked all events, and none of them contain any useful information on what it believes has changes

Example

new azure.storage.Account('downloads-blob-store', {
    resourceGroupName: globalResourceGroupName,
    name: downloadStoreName,

    accountTier: 'Standard',
    accountReplicationType: 'GZRS',

    enableHttpsTrafficOnly: true,

    accountKind: 'StorageV2',

    // Only change was this property, replacing deprecated allowBlobPublicAccess
    allowNestedItemsToBePublic: true,

    minTlsVersion: 'TLS1_2',

    accessTier: 'Hot',
}, {
    protect: true,
});

Output of pulumi about

CLI
Version 3.84.0
Go Version go1.21.1
Go Compiler gc

Plugins
NAME VERSION
azure 5.60.0
azure-native 2.24.0
azuread 5.46.0
cloudflare 5.0.0
docker 3.0.0
kubernetes 3.30.2
newrelic 5.10.0
nodejs unknown
random 4.0.0
tls 4.0.0

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

@barclayadam barclayadam added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 5, 2024
@barclayadam barclayadam changed the title UPgrading from v4 to v5 causes storage accounts to be recreated Upgrading from v4 to v5 causes storage accounts to be recreated Jan 5, 2024
@iwahbe
Copy link
Member

iwahbe commented Jan 9, 2024

Hi @barclayadam. Thanks for reporting this issue. This looks like a bug on our end.

You might be able to work-around the bug by replacing allowBlobPublicAccess with allowNestedItemsToBePublic before upgrading the provider.

@iwahbe iwahbe removed the needs-triage Needs attention from the triage team label Jan 9, 2024
@barclayadam
Copy link
Author

Hi @iwahbe. Do you mean by making a change in the state beforehand?

@iwahbe
Copy link
Member

iwahbe commented Jan 31, 2024

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants