// NewResourceConfigRaw constructs a ResourceConfig whose content is exactly
// the given value.
//
// The given value may contain hcl2shim.UnknownVariableValue to signal that
// something is computed, but it must not contain unprocessed interpolation
// sequences as we might've seen in Terraform v0.11 and prior.
NewResourceConfigRaw constructs a ResourceConfig whose content is exactly
the given value.

The given value may contain hcl2shim.UnknownVariableValue to signal that
something is computed, but it must not contain unprocessed interpolation
sequences as we might've seen in Terraform v0.11 and prior.
// NewResourceConfigRaw constructs a ResourceConfig whose content is exactly // the given value . // // The given value may contain hcl2shim . UnknownVariableValue to signal that // something is computed but it must not contain unprocessed interpolation // sequences as we might ' ve seen in Terraform v0 . 11 and prior .
func NewResourceConfigRaw(raw map[string]interface{}) *ResourceConfig {
	v := hcl2shim.HCL2ValueFromConfigValue(raw)
	cfg := hcl2shim.ConfigValueFromHCL2(v).(map[string]interface{})
	return &ResourceConfig{
		Raw:    raw,
		Config: cfg,
		ComputedKeys: newResourceConfigShimmedComputedKeys(v, ""),
	}
}
func NewResourceConfigRaw ( raw map [ string ] interface { } ) * ResourceConfig { v := hcl2shim . HCL2ValueFromConfigValue ( raw ) cfg := hcl2shim . ConfigValueFromHCL2 ( v ) . ( map [ string ] interface { } ) return & ResourceConfig { Raw : raw , Config : cfg , ComputedKeys : newResourceConfigShimmedComputedKeys ( v , " " ) , } }
NewResourceConfigRaw constructs a ResourceConfig whose content is exactly
the given value.
NewResourceConfigRaw constructs a ResourceConfig whose content is exactly the given value .
// This is a little weird but we round-trip the value through the hcl2shim // package here for two reasons: firstly, because that reduces the risk // of it including something unlike what NewResourceConfigShimmed would // produce, and secondly because it creates a copy of "raw" just in case // something is relying on the fact that in the old world the raw and // config maps were always distinct, and thus you could in principle mutate // one without affecting the other. (I sure hope nobody was doing that, though!)