func (r *RawConfig) Value() interface{} {
	if c := r.Config(); c != nil {
		if v, ok := c[r.Key]; ok {
			return v
		}
	}
	r.lock.Lock()
	defer r.lock.Unlock()
	return r.Raw[r.Key]
}
Value returns the value of the configuration if this configuration
has a Key set. If this does not have a Key set, nil will be returned.
package config
import (
	"bytes"
	"encoding/gob"
	"sync"
	"github.com/hashicorp/hil"
	"github.com/hashicorp/hil/ast"
	"github.com/mitchellh/copystructure"
	"github.com/mitchellh/reflectwalk"
)
const UnknownVariableValue = "74D93920-ED26-11E3-AC10-0800200C9A66"
type RawConfig struct {
	Key            string
	Raw            map[string]interface{}
	Interpolations []ast.Node
	Variables      map[string]InterpolatedVariable
	lock        sync.Mutex
	config      map[string]interface{}
	unknownKeys []string
}
func NewRawConfig(raw map[string]interface{}) (*RawConfig, error) {
	result := &RawConfig{Raw: raw}
	if err := result.init(); err != nil {
		return nil, err
	}
	return result, nil
}
func (r *RawConfig) RawMap() map[string]interface{} {
	r.lock.Lock()
	defer r.lock.Unlock()
	m := make(map[string]interface{})
	for k, v := range r.Raw {
		m[k] = v
	}
	return m
}
func (r *RawConfig) Copy() *RawConfig {
	if r == nil {
		return nil
	}
	r.lock.Lock()
	defer r.lock.Unlock()
	newRaw := make(map[string]interface{})
	for k, v := range r.Raw {
		newRaw[k] = v
	}
	result, err := NewRawConfig(newRaw)
	if err != nil {
		panic("copy failed: " + err.Error())
	}
	result.Key = r.Key
	return result
}