f6e694c72b
This includes a few changes: * The repo name -- and hence the Go modules -- changes from pulumi-fabric to pulumi. * The Node.js SDK package changes from @pulumi/pulumi-fabric to just pulumi. * The CLI is renamed from lumi to pulumi.
29 lines
608 B
Go
29 lines
608 B
Go
// Copyright 2017, Pulumi Corporation. All rights reserved.
|
|
|
|
package engine
|
|
|
|
import "github.com/pulumi/pulumi/pkg/tokens"
|
|
|
|
type DestroyOptions struct {
|
|
Environment string
|
|
Package string
|
|
DryRun bool
|
|
Debug bool
|
|
Parallel int
|
|
Summary bool
|
|
}
|
|
|
|
func (eng *Engine) Destroy(opts DestroyOptions) error {
|
|
info, err := eng.initEnvCmdName(tokens.QName(opts.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,
|
|
})
|
|
}
|