Internally, the engine deals with tokens.QName and not raw strings. Push that up to the API boundary
31 lines
585 B
Go
31 lines
585 B
Go
// Copyright 2017, Pulumi Corporation. All rights reserved.
|
|
|
|
package engine
|
|
|
|
import (
|
|
"github.com/pulumi/pulumi/pkg/tokens"
|
|
)
|
|
|
|
type DestroyOptions struct {
|
|
Package string
|
|
DryRun bool
|
|
Debug bool
|
|
Parallel int
|
|
Summary bool
|
|
}
|
|
|
|
func (eng *Engine) Destroy(environment tokens.QName, opts DestroyOptions) error {
|
|
info, err := eng.initEnvCmdName(environment, opts.Package)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return eng.deployLatest(info, deployOptions{
|
|
Debug: opts.Debug,
|
|
Destroy: true,
|
|
DryRun: opts.DryRun,
|
|
Parallel: opts.Parallel,
|
|
Summary: opts.Summary,
|
|
})
|
|
}
|