Disable termination of QEMU clusters on Windows

This commit is contained in:
Nils Hanke 2022-10-24 18:15:19 +02:00
parent 9f25bff0f4
commit 48d08f4d47

View File

@ -9,6 +9,8 @@ package cloudcmd
import (
"context"
"errors"
"fmt"
"runtime"
"github.com/edgelesssys/constellation/v2/cli/internal/libvirt"
"github.com/edgelesssys/constellation/v2/cli/internal/terraform"
@ -40,6 +42,10 @@ func (t *Terminator) Terminate(ctx context.Context, provider cloudprovider.Provi
}
if provider == cloudprovider.QEMU {
if runtime.GOARCH != "amd64" || runtime.GOOS != "linux" {
return fmt.Errorf("termination of a QEMU based Constellation is not supported for %s/%s", runtime.GOOS, runtime.GOARCH)
}
libvirt := t.newLibvirtRunner()
defer func() {
if retErr == nil {