You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
For our usecase we wanted to have additional tags to filter on, or mark specific resource groups.
We have so far solved this issue by using azure policy to only add the ttl tag to the resource groups we want gone...
So I do have a workaround for the problem, but wanted to leave the reference to resource graph so that the filters could be implemented as possibly were intended?
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
The text was updated successfully, but these errors were encountered: