diff --git a/providers/azure/resources/discovery.go b/providers/azure/resources/discovery.go index 1115287aac..1c40579ed4 100644 --- a/providers/azure/resources/discovery.go +++ b/providers/azure/resources/discovery.go @@ -639,6 +639,9 @@ func getSubConfig(rootConf *inventory.Config, sub subscriptions.Subscription) *i // note: we make sure to wipe out the discovery here, we don't want to re-discover when // connecting to an asset cfg.Discover = nil + if cfg.Options == nil { + cfg.Options = map[string]string{} + } cfg.Options[connection.OptionSubscriptionID] = *sub.SubscriptionID cfg.Options[connection.OptionTenantID] = *sub.TenantID return cfg