-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add preserve-config flag to destroy #20815
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: ashish111333 <[email protected]>
|
PR is now waiting for a maintainer to take action. Note for the maintainer: Commands available:
|
Frassle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a quick test, probably in tests/smoke/smoke_test.go but otherwise seems simple enough
|
AR will add test. |
| } | ||
|
|
||
| if preserveConfig { | ||
| fmt.Printf("The resources in the stack have been deleted, and history is removed.\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and preserve Pulumi-{stack}.yml config file. We usually display further option to user with destroy command to how to further get rid of the config file.
| &remove, "remove", false, | ||
| "Remove the stack and its config file after all resources in the stack have been deleted") | ||
| cmd.PersistentFlags().BoolVar(&preserveConfig, "preserve-config", false, | ||
| "preserves the stack config file") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| &remove, "remove", false, | ||
| "Remove the stack and its config file after all resources in the stack have been deleted") | ||
| cmd.PersistentFlags().BoolVar(&preserveConfig, "preserve-config", false, | ||
| "preserves the stack config file") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "preserves the stack config file") | |
| "Preserve the stack config file") |
added a preserve config flag to destroy Cmd now config is intact on
pulumi destroy --remove --preserve-config.closes #15069