cloudquery / cq-provider-azure

CloudQuery Provider for Azure
https://cloudquery.io
Mozilla Public License 2.0
11 stars 14 forks source link

Detect disabled subscriptions before fetching (and don't fetch from them) #215

Closed shimonp21 closed 2 years ago

shimonp21 commented 2 years ago

Fetching from a disabled subscription can cause unexpected behavior, including super-long fetch times (see https://github.com/cloudquery/cq-provider-azure/issues/212).

It might be better to just detect these disabled subscriptions before the fetch and skip them entirely.

bbernays commented 2 years ago

Check status of subscription, if status is disabled. Then skip during configuration of client. API Call: https://docs.microsoft.com/en-us/rest/api/resources/subscriptions/list

shimonp21 commented 2 years ago

Discussed with @yevgenypats this morning, who asked to prioritise this, because it will make it easier to run integration tests.