in hcl_block.go [251:266]
func (hb *HclBlock) evaluateAttributes(ctx *hcl.EvalContext) error {
for attributeName, attribute := range hb.Body.Attributes {
v, diag := attribute.Expr.Value(ctx)
if diag.HasErrors() {
return diag
}
hb.Body.Attributes[attributeName] = &hclsyntax.Attribute{
Name: attributeName,
Expr: &hclsyntax.LiteralValueExpr{
Val: v,
},
SrcRange: attribute.SrcRange,
}
}
return nil
}