provisioners/*: new interface
This commit is contained in:
parent
063e727491
commit
e5868ebdd9
|
@ -13,7 +13,9 @@ import (
|
|||
|
||||
type ResourceProvisioner struct{}
|
||||
|
||||
func (p *ResourceProvisioner) Apply(s *terraform.InstanceState,
|
||||
func (p *ResourceProvisioner) Apply(
|
||||
o terraform.UIOutput,
|
||||
s *terraform.InstanceState,
|
||||
c *terraform.ResourceConfig) error {
|
||||
// Ensure the connection type is SSH
|
||||
if err := helper.VerifySSH(s); err != nil {
|
||||
|
|
|
@ -20,6 +20,7 @@ const (
|
|||
type ResourceProvisioner struct{}
|
||||
|
||||
func (p *ResourceProvisioner) Apply(
|
||||
o terraform.UIOutput,
|
||||
s *terraform.InstanceState,
|
||||
c *terraform.ResourceConfig) error {
|
||||
|
||||
|
|
|
@ -20,8 +20,9 @@ func TestResourceProvider_Apply(t *testing.T) {
|
|||
"command": "echo foo > test_out",
|
||||
})
|
||||
|
||||
output := new(terraform.MockUIOutput)
|
||||
p := new(ResourceProvisioner)
|
||||
if err := p.Apply(nil, c); err != nil {
|
||||
if err := p.Apply(output, nil, c); err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,9 @@ const (
|
|||
|
||||
type ResourceProvisioner struct{}
|
||||
|
||||
func (p *ResourceProvisioner) Apply(s *terraform.InstanceState,
|
||||
func (p *ResourceProvisioner) Apply(
|
||||
o terraform.UIOutput,
|
||||
s *terraform.InstanceState,
|
||||
c *terraform.ResourceConfig) error {
|
||||
// Ensure the connection type is SSH
|
||||
if err := helper.VerifySSH(s); err != nil {
|
||||
|
|
Loading…
Reference in New Issue