in cli/bpmetadata/tfconfig.go [472:508]
func parseBlueprintServices(servicesFile *hcl.File) ([]string, error) {
var s []string
servicesContent, _, diags := servicesFile.Body.PartialContent(rootSchema)
err := hasHclErrors(diags)
if err != nil {
return nil, err
}
for _, block := range servicesContent.Blocks {
if block.Type != "module" {
continue
}
moduleContent, _, moduleContentDiags := block.Body.PartialContent(moduleSchema)
diags = append(diags, moduleContentDiags...)
err := hasHclErrors(diags)
if err != nil {
return nil, err
}
apisAttr, defined := moduleContent.Attributes["activate_apis"]
if !defined {
return nil, fmt.Errorf("activate_apis not defined for project module")
}
diags = gohcl.DecodeExpression(apisAttr.Expr, nil, &s)
err = hasHclErrors(diags)
if err != nil {
return nil, err
}
// because we're only interested in the top-level modules block
break
}
return s, nil
}