(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext)
| 1447 | } |
| 1448 | |
| 1449 | func (s *DefaultSpec) decode(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { |
| 1450 | val, diags := s.Primary.decode(content, blockLabels, ctx) |
| 1451 | if val.IsNull() { |
| 1452 | var moreDiags hcl.Diagnostics |
| 1453 | val, moreDiags = s.Default.decode(content, blockLabels, ctx) |
| 1454 | diags = append(diags, moreDiags...) |
| 1455 | } |
| 1456 | return val, diags |
| 1457 | } |
| 1458 | |
| 1459 | func (s *DefaultSpec) impliedType() cty.Type { |
| 1460 | return s.Primary.impliedType() |