Commit Graph

1 Commits

Author SHA1 Message Date
Martin Atkins 22d140e883 configschema: Block.CoerceValue method
The usual way to use a configschema.Block is to obtain a hcldec spec from
it and then decode an hcl.Body. There are inevitably situations though
where a body has already been decoded into a cty.Value before we know
which schema we need to use.

This new method CoerceValue is intended to deal with this case, applying
the schema to an already-decoded value in what should be an intuitive way
for most situations.
2018-10-16 18:24:47 -07:00