in packages/rulesets/src/native/utilities/arm-helper.ts [382:401]
private getResourcesTypeHierarchy(path: string) {
const index = path.lastIndexOf("/providers/")
if (index === -1) {
return []
}
const lastProvider = path.substr(index)
const result = []
const matches = lastProvider.match(this.SpecificResourcePathRegEx)
if (matches && matches.length) {
const match = matches[0]
const segments = match.split("/").slice(3)
for (const segment of segments) {
if (segment.startsWith("{") || segment === "default") {
continue
}
result.push(segment)
}
}
return result
}