So I deleted something from the AWS console, and t...
# aws
s
So I deleted something from the AWS console, and then deleted it from the pulumi config (thinking that it could reconcile the state). But now when I run
pulumi up
, it seems to be failing because it can't delete the resource that isn't there. What's the best way out of this state?
n
i would suggest: 1. deploying with resource back in 2. once that deploys, then comment it out (don’t manually remove from anywhere) 3. re-deploy with it commented out
once it deploys with it commented out, you can then remove it from the code.
for future reference, i would suggest to NEVER manually remove anything created from pulumi from the aws console.
a
Or export it to using
pulumi export > stack.json
, remove the deleted resource manually and import the stack back Also to echo the comment above, don’t manually touch your infra unless you’re ready to destroy your stack 🙂
👍 2
n
yes, you could also
pulumi stack export > stack.json
find said resource, remove object, then
pulumi stack import < stack.json
s
Btw, thanks! I got this working.
n
👍
f
If you’re modifying state purely to delete something, there’s also
pulumi state delete