Skip to content

Commit b59fc69

Browse files
authored
feat(azure): Support Skip Subscriptions (#10884)
#### Summary closes: #10829
1 parent b5ec559 commit b59fc69

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

plugins/source/azure/client/client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Op
293293
return nil, err
294294
}
295295
}
296+
// User specified subscriptions, that CloudQuery should skip syncing
297+
c.subscriptions = funk.LeftJoinString(c.subscriptions, spec.SkipSubscriptions)
296298

297299
if len(c.subscriptions) == 0 {
298300
return nil, fmt.Errorf("no subscriptions found")

plugins/source/azure/client/spec.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ type Spec struct {
44
Subscriptions []string `json:"subscriptions"`
55
CloudName string `json:"cloud_name"`
66
DiscoveryConcurrency int `json:"discovery_concurrency"`
7+
SkipSubscriptions []string `json:"skip_subscriptions"`
78
}
89

910
func (s *Spec) SetDefaults() {

website/pages/docs/plugins/sources/azure/configuration.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ This is the (nested) spec used by the Azure source plugin.
2626
During initialization the Azure source plugin discovers all resource groups and enabled resource providers per subscription, to be used later on during the sync process.
2727
The plugin runs the discovery process in parallel. This setting controls the maximum number of concurrent requests to the Azure API during discovery.
2828
Only accounts with many subscriptions should require modifying this setting, to either lower it to avoid network errors, or to increase it to speed up the discovery process.
29+
30+
- `skip_subscriptions` ([]string) (default: empty)
31+
32+
A list of subscription IDs that CloudQuery will skip syncing. This is useful if CloudQuery is discovering the list of subscription IDs and there are some subscriptions that you want to not even attempt syncing

0 commit comments

Comments
 (0)