update privisioner bins to use new functions

This commit is contained in:
Mitchell Hashimoto 2016-12-22 17:11:05 -08:00
parent 3c0c81957a
commit f29845e54e
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
3 changed files with 7 additions and 8 deletions

View File

@ -3,13 +3,10 @@ package main
import ( import (
"github.com/hashicorp/terraform/builtin/provisioners/file" "github.com/hashicorp/terraform/builtin/provisioners/file"
"github.com/hashicorp/terraform/plugin" "github.com/hashicorp/terraform/plugin"
"github.com/hashicorp/terraform/terraform"
) )
func main() { func main() {
plugin.Serve(&plugin.ServeOpts{ plugin.Serve(&plugin.ServeOpts{
ProvisionerFunc: func() terraform.ResourceProvisioner { ProvisionerFunc: file.Provisioner,
return new(file.ResourceProvisioner)
},
}) })
} }

View File

@ -3,13 +3,10 @@ package main
import ( import (
"github.com/hashicorp/terraform/builtin/provisioners/remote-exec" "github.com/hashicorp/terraform/builtin/provisioners/remote-exec"
"github.com/hashicorp/terraform/plugin" "github.com/hashicorp/terraform/plugin"
"github.com/hashicorp/terraform/terraform"
) )
func main() { func main() {
plugin.Serve(&plugin.ServeOpts{ plugin.Serve(&plugin.ServeOpts{
ProvisionerFunc: func() terraform.ResourceProvisioner { ProvisionerFunc: remoteexec.Provisioner,
return new(remoteexec.ResourceProvisioner)
},
}) })
} }

View File

@ -132,6 +132,11 @@ type Provisioner struct {
// ResourceProvisioner represents a generic chef provisioner // ResourceProvisioner represents a generic chef provisioner
type ResourceProvisioner struct{} type ResourceProvisioner struct{}
func (r *ResourceProvisioner) Stop() error {
// Noop for now. TODO in the future.
return nil
}
// Apply executes the file provisioner // Apply executes the file provisioner
func (r *ResourceProvisioner) Apply( func (r *ResourceProvisioner) Apply(
o terraform.UIOutput, o terraform.UIOutput,