Hi all. Quick question, I think I managed to come ...
# general
l
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
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
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
hmm not sure then tbh that's worked for me