Skip to content

Commit

Permalink
Ignore armschema resoruce types that have trailing slash
Browse files Browse the repository at this point in the history
  • Loading branch information
magodo committed May 18, 2023
1 parent 8624647 commit 5863121
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions azlist/azlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,17 @@ func BuildARMSchemaTree(armSchemaFile []byte) (ARMSchemaTree, error) {
}
}

var deleteRts []string
// Remove resource types that has trailing slash, e.g. "Microsoft.Network/publicIPAddresses/"
for rt := range armSchemas {
if strings.HasSuffix(rt, "/") {
deleteRts = append(deleteRts, rt)
}
}
for _, rt := range deleteRts {
delete(armSchemas, rt)
}

remains := len(armSchemas)

for remains > 0 {
Expand Down

0 comments on commit 5863121

Please sign in to comment.