pulumi/pkg/engine/destroy.go
joeduffy f189c40f35 Wire up Lumi to the new runtime strategy
🔥 🔥 🔥  🔥 🔥 🔥

Getting closer on #311.
2017-09-04 11:35:21 -07:00

28 lines
567 B
Go

// Copyright 2017, Pulumi Corporation. All rights reserved.
package engine
import "github.com/pulumi/pulumi-fabric/pkg/tokens"
type DestroyOptions struct {
Environment string
Package string
DryRun bool
Debug bool
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,
Summary: opts.Summary,
})
}