Is there anyway to undo an import? (python) I've i...
# general
s
Is there anyway to undo an import? (python) I've imported a resource using CLI, saw it's code but decided not to bring the code to the
__main__.py
file, even though the imported code isn't at main file, the CLI keeps prompting
Preview failed: unable to delete resource...
b
@straight-crayon-4578 get the resources urn using
pulumi stack --show-urns
and then delete it from the state:
Copy code
pulumi state delete <urn>
s
@billowy-army-68599 I tried that but got:
error: This resource can't be safely deleted because it is protected. Re-run this command with --force to force deletion
This will delete only from pulumi stack or also from cloud provider? I dont want to delete from cloud provider... Thanks!
b
it won't delete anything from the cloud provider, it just removes it from the Pulumi state
🙂 1
✅ 1
107 Views