pulumi/pkg/engine/destroy.go
Joe Duffy f6e694c72b Rename pulumi-fabric to pulumi
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.
2017-09-21 19:18:21 -07:00

30 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,
})
}