add GetSchema to provisioner interface

f-hcl2-planstate
James Bardin 8 years ago committed by Martin Atkins
parent 661848d30d
commit 119665ec6a

@ -1,12 +1,16 @@
package provisioner
import (
"github.com/hashicorp/terraform/config/configschema"
"github.com/hashicorp/terraform/tfdiags"
"github.com/zclconf/go-cty/cty"
)
// Interface is the set of methods required for a resource provisioner plugin.
type Interface interface {
// GetSchema returns the schema for the provisioner configuration.
GetSchema() GetSchemaResponse
// ValidateProvisionerConfig allows the provisioner to validate the
// configuration values.
ValidateProvisionerConfig(ValidateProvisionerConfigRequest) ValidateProvisionerConfigResponse
@ -30,6 +34,14 @@ type Interface interface {
Stop() error
}
type GetSchemaResponse struct {
// Provisioner contains the schema for this provisioner.
Provisioner *configschema.Block
// Diagnostics contains any warnings or errors from the method call.
Diagnostics tfdiags.Diagnostics
}
// UIOutput provides the Output method for resource provisioner
// plugins to write any output to the UI.
//

Loading…
Cancel
Save