:wave: Hi! We are trying to migrate a stack from P...
# general
a
๐Ÿ‘‹ Hi! We are trying to migrate a stack from Pulumi Cloud to self-managed backend. We are using Azure Blob Storage for storing the state and use KeyVault for encryption/secrets. I successfully exported the stack, changed secrets provider, imported to the new backend following official docs (albeit the other way around). We faced the first blocker with KeyVault, as is described in this GitHub issue, but that was resolved using correct env variables. The issue is - Pulumi wants to recreate (or rather perform Delete and Create operation on) the resources. After
pulumi state ls
, it lists the stack with correct number of resources and last update, though. Pulumi Cloud-managed stack reports no changes. I tried importing one resource manually using
pulumi import <urn> <id>
to see whether it will correctly track the state, but received this, rather cryptic, error:
Copy code
Diagnostics:
  pulumi:pulumi:Stack (Mews.ServicePoc9-AzureDevelopment):
    error: preview failed: failed to validate provider config: could not find la[secret] version for provider urn: 404 HTTP error fetching plugin from <https://api.github.com/repos/pulumi/pulumi-urn/releases/la[secret]>. If this is a private GitHub repository, try providing a token via the GITHUB_TOKEN environment variable. See: <https://github.com/settings/tokens>
I tried setting the GH token, but the issue persists. What could be the reason? For clarity - I did name the new stack differently. How could it affect providers/plugins, and why? I will also include the screenshot in the ๐Ÿงต. Thanks in advance!
Just to test it - I renamed the new exported stack the same way as our stack in Pulumi Cloud, and it picked it up, no changes. ๐Ÿค” Probably due to resource URNs in the state. Is there a way to name the new stack arbitrarily, while at the same time not prevent this behavior?
f
All resources are children of the corn stack, so re-naming the stack would delete and re-create all sub-resources ๐Ÿ˜ž Your best bet is to use the aliases feature, which allows resources with a new URN to be considered the same as something else (aka themselves with the old urn)
a
Thanks a ton! I will give it a shot. That kinda confirms my original theory. ๐Ÿ˜…