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 (
"github.com/hashicorp/terraform/builtin/provisioners/file"
"github.com/hashicorp/terraform/plugin"
"github.com/hashicorp/terraform/terraform"
)
func main() {
plugin.Serve(&plugin.ServeOpts{
ProvisionerFunc: func() terraform.ResourceProvisioner {
return new(file.ResourceProvisioner)
},
ProvisionerFunc: file.Provisioner,
})
}

View File

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

View File

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