From f48acb1b0c8c4461de8557149e8c17366d6d701b Mon Sep 17 00:00:00 2001 From: Xu Wu Date: Thu, 19 Oct 2023 22:24:12 +0800 Subject: [PATCH] fix panic (#23599) --- .../storage/storage_account_customer_managed_key_resource.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/services/storage/storage_account_customer_managed_key_resource.go b/internal/services/storage/storage_account_customer_managed_key_resource.go index ced9489d0d1d..363e444eaf68 100644 --- a/internal/services/storage/storage_account_customer_managed_key_resource.go +++ b/internal/services/storage/storage_account_customer_managed_key_resource.go @@ -9,6 +9,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsms" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" @@ -278,7 +279,7 @@ func resourceStorageAccountCustomerManagedKeyRead(d *pluginsdk.ResourceData, met if err != nil { return fmt.Errorf("retrieving Key Vault ID from the Base URI %q: %+v", keyVaultURI, err) } - keyVaultID = *tmpKeyVaultID + keyVaultID = pointer.From(tmpKeyVaultID) } d.Set("storage_account_id", id.ID())