From 6327bcb01f998c22048c4aad06c1c0dc5df472c1 Mon Sep 17 00:00:00 2001 From: Ivan Milchev Date: Fri, 16 Feb 2024 16:21:00 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20use=20upstream=20config=20from?= =?UTF-8?q?=20parent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ivan Milchev --- apps/cnquery/cmd/scan.go | 1 + providers/coordinator.go | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/cnquery/cmd/scan.go b/apps/cnquery/cmd/scan.go index b1a272578c..e995179b0b 100644 --- a/apps/cnquery/cmd/scan.go +++ b/apps/cnquery/cmd/scan.go @@ -257,6 +257,7 @@ func getCobraScanConfig(cmd *cobra.Command, runtime *providers.Runtime, cliRes * Incognito: conf.IsIncognito, Creds: serviceAccount, } + providers.DefaultRuntime().UpstreamConfig = conf.runtime.UpstreamConfig } else { log.Warn().Msg("No credentials provided. Switching to --incognito mode.") conf.IsIncognito = true diff --git a/providers/coordinator.go b/providers/coordinator.go index 63d7c31841..265c4b9885 100644 --- a/providers/coordinator.go +++ b/providers/coordinator.go @@ -360,6 +360,7 @@ func (c *coordinator) newRuntime() *Runtime { func (c *coordinator) NewRuntimeFrom(parent *Runtime) *Runtime { res := c.NewRuntime() + res.UpstreamConfig = parent.UpstreamConfig res.recording = parent.Recording() for k, v := range parent.providers { res.providers[k] = v