Skip to content

Conversation

@scjody
Copy link

@scjody scjody commented Aug 20, 2025

Closes #1275

Note that I vibe coded this and haven't yet reviewed or tested it. I'll mark the PR as ready for review and remove this message once it's ready!

This adds a new preview-only input parameter that allows users to preview what would be destroyed without actually performing the destruction. This is equivalent to running pulumi destroy --preview-only from the CLI.

Changes:

  • Added preview-only input parameter to action.yml
  • Updated config.ts to handle the new parameter
  • Added tests for the new functionality
  • Updated README.md documentation

This adds a new `preview-only` input parameter that allows users to preview
what would be destroyed without actually performing the destruction. This is
equivalent to running `pulumi destroy --preview-only` from the CLI.

Changes:
- Added `preview-only` input parameter to action.yml
- Updated config.ts to handle the new parameter
- Added tests for the new functionality
- Updated README.md documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@tgummerer
Copy link
Contributor

Just a heads up, this is not going to be as simple as it looks at first glance. GitHub Actions uses the pulumi automation api under the hood. destroy does support a "preview only" flag, but I believe it's deprecated because it does not work correctly.

Although on second look, we don't even seem to have implemented previewDestroy in the NodeJS automation API yet. @i-am-tom pulumi/pulumi#19948 seems to hint that we should implement previewDestroy for the NodeJS automation API as well, but it doesn't look like we ever did that. Was that an oversight, or does the preview_only flag work for destroy in the automation API?

@scjody
Copy link
Author

scjody commented Aug 21, 2025

Thanks for the information! At this point I've worked around the issue because we have a major project due in early September, but I hope to have time to work on this (manually) later next month.

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.

Pulumi Destroy support for --preview-only option

2 participants