From a9fe3dccf783ae4dd3c268923bff65020259f102 Mon Sep 17 00:00:00 2001 From: magodo Date: Tue, 10 Sep 2024 10:20:23 +0800 Subject: [PATCH] skip rp register different handling for diff providers --- internal/meta/base_meta.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/meta/base_meta.go b/internal/meta/base_meta.go index aa0df51..79b871c 100644 --- a/internal/meta/base_meta.go +++ b/internal/meta/base_meta.go @@ -268,7 +268,12 @@ func NewBaseMeta(cfg config.CommonConfig) (*baseMeta, error) { setIfNoExist("use_oidc", cty.BoolVal(cfg.AuthConfig.UseOIDC)) // Update provider config for provider registration - setIfNoExist("resource_provider_registrations", cty.StringVal("none")) + switch cfg.ProviderName { + case "azurerm": + setIfNoExist("resource_provider_registrations", cty.StringVal("none")) + case "azapi": + setIfNoExist("skip_provider_registration", cty.BoolVal(true)) + } meta := &baseMeta{ logger: cfg.Logger,