File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
internal/cmd/beta/alb/delete Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 88 "github.com/stackitcloud/stackit-cli/internal/pkg/examples"
99 "github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
1010 "github.com/stackitcloud/stackit-cli/internal/pkg/print"
11+ "github.com/stackitcloud/stackit-cli/internal/pkg/projectname"
1112 "github.com/stackitcloud/stackit-cli/internal/pkg/services/alb/client"
1213
1314 "github.com/spf13/cobra"
@@ -48,6 +49,20 @@ func NewCmd(p *print.Printer) *cobra.Command {
4849 return err
4950 }
5051
52+ projectLabel , err := projectname .GetProjectName (ctx , p , cmd )
53+ if err != nil {
54+ p .Debug (print .ErrorLevel , "get project name: %v" , err )
55+ projectLabel = model .ProjectId
56+ }
57+
58+ if ! model .AssumeYes {
59+ prompt := fmt .Sprintf ("Are you sure you want to delete the application loadbalancer %q for project %q?" , model .Name , projectLabel )
60+ err = p .PromptForConfirmation (prompt )
61+ if err != nil {
62+ return err
63+ }
64+ }
65+
5166 // Call API
5267 req := buildRequest (ctx , model , apiClient )
5368 _ , err = req .Execute ()
You can’t perform that action at this time.
0 commit comments