From a035554d03c62140eafa63dd4e3fcf7c9c0ed712 Mon Sep 17 00:00:00 2001 From: magodo Date: Thu, 26 Oct 2023 15:53:19 +0800 Subject: [PATCH] Provider block existance check for azapi --- internal/meta/base_meta.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/meta/base_meta.go b/internal/meta/base_meta.go index 31c2ab6..c7b40b6 100644 --- a/internal/meta/base_meta.go +++ b/internal/meta/base_meta.go @@ -724,7 +724,7 @@ func (meta *baseMeta) initProvider(ctx context.Context) error { return err } - if module.ProviderConfigs["azurerm"] == nil { + if module.ProviderConfigs[meta.providerName] == nil { log.Printf("[INFO] Output directory doesn't contain provider setting, create one then") cfgFile := filepath.Join(meta.outdir, meta.outputFileNames.ProviderFileName) // #nosec G306