https://pulumi.com logo
#general
Title
# general
l

loud-oyster-36834

03/31/2020, 2:23 PM
Hi all. Quick question, I think I managed to come into a weird state after importing a resource from Azure. Now pulumi want to replace the resource completely just because the name is different(?).
Copy code
+-  ├─ azure:network:ApplicationGateway extgateway replace [diff: ~name]
Is it possible to recover the stack from this state? setting the
name
and
pulumi up
, then remove
name
will just revert me back into the same state.
b

better-rainbow-14549

03/31/2020, 2:24 PM
you can specify the other name in "aliases" so it will know they're the same
then i think you do an up with no changes to fix the state and you can take it out
l

loud-oyster-36834

03/31/2020, 3:04 PM
Thanks for your reply @better-rainbow-14549. But that did not seem to work 😞 1. Added alias "extgatewaya4f45d9d" as resourceopts 2.
pulumi up
I get the same result:
Copy code
++azure:network/applicationGateway:ApplicationGateway: (create-replacement)
        [id=/subscriptions/*****/resourceGroups/*****/providers/Microsoft.Network/applicationGateways/extgatewaya4f45d9d]
        [urn=urn:pulumi:*****::*****::azure:network/applicationGateway:ApplicationGateway::extgateway]
        [provider=urn:pulumi:*****::*****::pulumi:providers:azure::default_2_1_0::]
      ~ name: "extgatewaya4f45d9d" => "extgatewayda1ac9a0"
    +-azure:network/applicationGateway:ApplicationGateway: (replace)
        [id=/subscriptions/*****/resourceGroups/*****/providers/Microsoft.Network/applicationGateways/extgatewaya4f45d9d]
        [urn=urn:pulumi:*****::*****::azure:network/applicationGateway:ApplicationGateway::extgateway]
        [provider=urn:pulumi:*****::*****::pulumi:providers:azure::default_2_1_0::]
      ~ name: "extgatewaya4f45d9d" => "extgatewayda1ac9a0"
I guess this will be fine in this case, since its a
create-replacement
? So there will not be any downtime. But still little bit annoying.
b

better-rainbow-14549

03/31/2020, 4:08 PM
hmm not sure then tbh that's worked for me
2 Views