Thread
#general
    s

    straight-crayon-4578

    4 months ago
    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

    billowy-army-68599

    4 months ago
    @straight-crayon-4578 get the resources urn using
    pulumi stack --show-urns
    and then delete it from the state:
    pulumi state delete <urn>
    s

    straight-crayon-4578

    4 months ago
    @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

    billowy-army-68599

    4 months ago
    it won't delete anything from the cloud provider, it just removes it from the Pulumi state