make blocktoattr an hcldec.UnknownBody
This will allow any dynamic blocks that are fixed up as a blocktoattr still decode into an unknown value.
This commit is contained in:
parent
b7fb533bd2
commit
b515ab583a
|
@ -41,6 +41,17 @@ type fixupBody struct {
|
|||
names map[string]struct{}
|
||||
}
|
||||
|
||||
type unknownBlock interface {
|
||||
Unknown() bool
|
||||
}
|
||||
|
||||
func (b *fixupBody) Unknown() bool {
|
||||
if u, ok := b.original.(unknownBlock); ok {
|
||||
return u.Unknown()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Content decodes content from the body. The given schema must be the lower-level
|
||||
// representation of the same schema that was previously passed to FixUpBlockAttrs,
|
||||
// or else the result is undefined.
|
||||
|
|
Loading…
Reference in New Issue