mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-03 23:04:53 -04:00
AB#2532 Dont clean up workspace if rollback fails (#360)
* Dont clean up workspace if rollback fails * Remove dependency on CSP from terminate Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
1f8eba37c8
commit
e66cb84d6e
16 changed files with 190 additions and 111 deletions
|
@ -16,7 +16,6 @@ import (
|
|||
"go.uber.org/multierr"
|
||||
|
||||
"github.com/edgelesssys/constellation/v2/cli/internal/cloudcmd"
|
||||
"github.com/edgelesssys/constellation/v2/cli/internal/clusterid"
|
||||
"github.com/edgelesssys/constellation/v2/internal/constants"
|
||||
"github.com/edgelesssys/constellation/v2/internal/file"
|
||||
)
|
||||
|
@ -45,13 +44,8 @@ func runTerminate(cmd *cobra.Command, args []string) error {
|
|||
|
||||
func terminate(cmd *cobra.Command, terminator cloudTerminator, fileHandler file.Handler, spinner spinnerInterf,
|
||||
) error {
|
||||
var idFile clusterid.File
|
||||
if err := fileHandler.ReadJSON(constants.ClusterIDsFileName, &idFile); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
spinner.Start("Terminating", false)
|
||||
err := terminator.Terminate(cmd.Context(), idFile.CloudProvider)
|
||||
err := terminator.Terminate(cmd.Context())
|
||||
spinner.Stop()
|
||||
if err != nil {
|
||||
return fmt.Errorf("terminating Constellation cluster: %w", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue