mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-05 12:27:40 +00:00
fix: prevent -Force -Cleanup with -Version filter
Force cleanup wipes all Terraform state, so filtering by version would leave an inconsistent state where subsequent provisions fail. Error early with a clear message instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -266,7 +266,10 @@ if ($Integration) {
|
||||
if ($Cleanup) {
|
||||
Start-InfraContainer
|
||||
if ($Force) {
|
||||
docker exec $InfraContainer bash $RunIntegration force-cleanup $Version
|
||||
if ($Version -ne 'all') {
|
||||
throw "-Force cannot be combined with -Version. Force cleanup destroys all resources and wipes Terraform state."
|
||||
}
|
||||
docker exec $InfraContainer bash $RunIntegration force-cleanup
|
||||
} else {
|
||||
docker exec $InfraContainer bash $RunIntegration cleanup $Version
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user