func (b *Backend) Config() *ResourceData {
	return b.config
}
Config returns the configuration. This is available after Configure is
called.
package schema
import (
	"context"
	"github.com/hashicorp/terraform/terraform"
)
type Backend struct {
	Schema map[string]*Schema
	ConfigureFunc func(context.Context) error
	config *ResourceData
}
const (
	backendConfigKey = iota
)
func FromContextBackendConfig(ctx context.Context) *ResourceData {
	return ctx.Value(backendConfigKey).(*ResourceData)
}
func (b *Backend) Input(
	input terraform.UIInput,
	c *terraform.ResourceConfig) (*terraform.ResourceConfig, error) {
	if b == nil {
		return c, nil
	}
	return schemaMap(b.Schema).Input(input, c)
}
func (b *Backend) Validate(c *terraform.ResourceConfig) ([]string, []error) {
	if b == nil {
		return nil, nil
	}
	return schemaMap(b.Schema).Validate(c)
}
func (b *Backend) Configure(c *terraform.ResourceConfig) error {
	if b == nil {
		return nil
	}
	sm := schemaMap(b.Schema)
	diff, err := sm.Diff(nil, c)
	if err != nil {
		return err
	}
	data, err := sm.Data(nil, diff)
	if err != nil {
		return err
	}
	b.config = data
	if b.ConfigureFunc != nil {
		err = b.ConfigureFunc(context.WithValue(
			context.Background(), backendConfigKey, data))
		if err != nil {
			return err
		}
	}
	return nil
}