-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Using this example:
resource "talos_machine_configuration_apply" "this" {
client_configuration = talos_machine_secrets.this.client_configuration
machine_configuration_input = data.talos_machine_configuration.this.machine_configuration
node = var.node_ip
on_destroy = {
graceful = false
reboot = true
reset = true
}
}
On destroy, when setting reset to true, it only wipes the ephemeral and state partitions which is the equivalent of this command.
talosctl reset --graceful=false --reboot=true --system-labels-to-wipe EPHEMERAL,STATE
However, I want to be able to wipe all partitions on destroy which is the equivalent of this command.
talosctl reset --graceful=false --reboot=true
I noticed there was a previous issue that changed the default behavior of reset.
#205
Just like the talosctl command, I'd like to be able to specify what system labels to wipe. Perhaps another field here would be helpful or something similar to below.
on_destroy = {
graceful = false
reboot = true
reset = true
system_labels_to_wipe = ["EPHEMERAL","STATE","u-local-volume"]
}
The DEFAULT behavior should also match the talosctl command. If system_labels_to_wipe option is not specified or the list is empty, it'll wipe all partitions.