Open
Description
First of I assume the additional filters do not work, since you encountered issues upon implementing them.
I noticed that the REST API does not support all odata Filter options that one would assume that it should.
Microsoft has created resource graph for performant resource exploration
Using the Resource Graph Go Module should give the ability to both use advanced filters as well as looking up resources based on a management group such as for example a sandbox management group
where the janitor would work on resources that are in the subscriptions below that management group removing the necessity to configure the janitor call each time a new sandbox subscription is added to that management group.
Example Query
results, err := resGraphClient.Resources(ctx,
armresourcegraph.QueryRequest{
Query: to.Ptr("ResourceContainers | where type=='microsoft.resources/subscriptions/resourcegroups' | where tags['ttl'] and tags['ttl_excluded'] | project name, tags"),
Subscriptions: []*string{
to.Ptr(subscriptionId)},
},
nil)
Metadata
Metadata
Assignees
Labels
No labels