Skip to content

Commit

Permalink
skip subscription in delete/disabled state
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <[email protected]>
  • Loading branch information
mblaschke committed Aug 21, 2024
1 parent d02b3cd commit 248b039
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions azuresdk/armclient/client.subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ func (azureClient *ArmClient) ListSubscriptions(ctx context.Context) (map[string
for _, subscription := range result.Value {
useSubscription := false

// skip subscription in delete/disabled state
if subscription.State != nil && *subscription.State == armsubscriptions.SubscriptionStateDisabled {
continue
}

// use subscription filter
if len(azureClient.serviceDiscovery.subscriptionIds) > 0 {
useSubscription = false
Expand Down

0 comments on commit 248b039

Please sign in to comment.