My Pulumi stack is in a broken state that I believ...
# general
d
My Pulumi stack is in a broken state that I believe should be impossible, not sure what I’m missing. I have a stack with multiple AWS providers for different AWS accounts. I deactivated one of these accounts outside of Pulumi which, as expected, caused
pulumi up
and
pulumi refresh
to stop working. So I exported the stack, edited the JSON to remove all references to resources or providers in the removed account, and imported the stack. Now,
pulumi refresh
works fine, and the stack looks right in the UI and when I export it and look at the JSON. But when I try to run
pulumi up
it still complains because it tries to assume a role in the old account to refresh a resource that no longer exists in the stack. The resource referred to in the error message is not present in the UI, using
pulumi stack --show-urns
or when exporting and grepping the
stack.json.
How can this be? Why is Pulumi still trying to access that resource that it shouldn’t even know exists at this point?
e
That is odd. Does
pulumi preview
also error due to the role change?
d
pulumi preview
fails as well.
Ah. I found it. My fault. It’s still trying to create a resource in the old account because it’s actually reflecting over
getOrganization().accounts
and trying to create a new resource in the deactivated account.
forgot it did that — my apologies for the spam
e
No worries