Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] Provide user feedback when protected resources can't be deleted #7055

Merged
merged 1 commit into from
May 17, 2021

Conversation

stack72
Copy link
Contributor

@stack72 stack72 commented May 14, 2021

Fixes: #4662

Before:

Diagnostics:
  random:index:RandomPassword (test):
    error: Preview failed: refusing to delete protected resource 'urn:pulumi:dev::test-protected-resource::random:index/randomPassword:RandomPassword::test'

  pulumi:pulumi:Stack (test-protected-resource-dev):
    error: preview failed

After:

Diagnostics:
  pulumi:pulumi:Stack (test-protected-resource-dev):
    error: preview failed

  random:index:RandomPassword (test):
    error: Preview failed: unable to delete resource "urn:pulumi:dev::test-protected-resource::random:index/randomPassword:RandomPassword::test"
    as it is currently marked for protection. To unprotect the resource, either remove the protection bit from your Pulumi application or use the command:
    `pulumi state unprotect urn:pulumi:dev::test-protected-resource::random:index/randomPassword:RandomPassword::test`


@stack72 stack72 requested a review from leezen May 14, 2021 10:11
@stack72 stack72 self-assigned this May 14, 2021
pkg/resource/deploy/step.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add hint on how to circumvent refusal to delete protected resources.
3 participants