specNeedingVariables implementation
(content *hcl.BodyContent)
| 1056 | |
| 1057 | // specNeedingVariables implementation |
| 1058 | func (s *BlockObjectSpec) variablesNeeded(content *hcl.BodyContent) []hcl.Traversal { |
| 1059 | var ret []hcl.Traversal |
| 1060 | |
| 1061 | for _, childBlock := range content.Blocks { |
| 1062 | if childBlock.Type != s.TypeName { |
| 1063 | continue |
| 1064 | } |
| 1065 | |
| 1066 | ret = append(ret, Variables(childBlock.Body, s.Nested)...) |
| 1067 | } |
| 1068 | |
| 1069 | return ret |
| 1070 | } |
| 1071 | |
| 1072 | func (s *BlockObjectSpec) decode(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { |
| 1073 | var diags hcl.Diagnostics |
nothing calls this directly
no test coverage detected