From 45e4e07eb334ac83fd5223087ce02dca99b3cdeb Mon Sep 17 00:00:00 2001 From: vjeffrey Date: Tue, 3 Oct 2023 14:22:29 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20panic=20in=20azure=20disco?= =?UTF-8?q?very=20(#2064)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/azure/resources/discovery.go | 3 +++ 1 file changed, 3 insertions(+) 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