Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions internal/services/storage/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package client
import (
"fmt"

storage_v2023_01_01 "github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01"
storage "github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01"
"github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource"
"github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/registeredserverresource"
"github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/serverendpointresource"
Expand All @@ -23,7 +23,7 @@ var StorageDomainSuffix *string
type Client struct {
StorageDomainSuffix string

ResourceManager *storage_v2023_01_01.Client
ResourceManager *storage.Client
// TODO: import the Storage Sync Meta Client and use that
SyncCloudEndpointsClient *cloudendpointresource.CloudEndpointResourceClient
SyncGroupsClient *syncgroupresource.SyncGroupResourceClient
Expand All @@ -43,7 +43,7 @@ func NewClient(o *common.ClientOptions) (*Client, error) {
// Set global variable for post-configure validation
StorageDomainSuffix = storageSuffix

resourceManager, err := storage_v2023_01_01.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) {
resourceManager, err := storage.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) {
o.Configure(c, o.Authorizers.ResourceManager)
})
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/services/storage/client/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
)

var (
Expand Down Expand Up @@ -70,7 +70,7 @@ func (ad *AccountDetails) AccountKey(ctx context.Context, client Client) (*strin

log.Printf("[DEBUG] Cache Miss - looking up the account key for %s..", ad.StorageAccountId)
opts := storageaccounts.DefaultListKeysOperationOptions()
opts.Expand = pointer.To(storageaccounts.ListKeyExpandKerb)
opts.Expand = pointer.To(storageaccounts.ExpandKerb)
listKeysResp, err := client.ResourceManager.StorageAccounts.ListKeys(ctx, ad.StorageAccountId, opts)
if err != nil {
return nil, fmt.Errorf("listing Keys for %s: %+v", ad.StorageAccountId, err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/fileservice"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/fileservices"
"github.com/hashicorp/go-azure-sdk/sdk/client"
"github.com/hashicorp/go-azure-sdk/sdk/client/pollers"
storageClients "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/client"
Expand All @@ -18,13 +18,13 @@ import (
var _ pollers.PollerType = &DataPlaneFileShareAvailabilityPoller{}

type DataPlaneFileShareAvailabilityPoller struct {
client *fileservice.FileServiceClient
client *fileservices.FileServicesClient
storageAccountId commonids.StorageAccountId
}

func NewDataPlaneFileShareAvailabilityPoller(client *storageClients.Client, account *storageClients.AccountDetails) (*DataPlaneFileShareAvailabilityPoller, error) {
return &DataPlaneFileShareAvailabilityPoller{
client: client.ResourceManager.FileService,
client: client.ResourceManager.FileServices,
storageAccountId: account.StorageAccountId,
}, nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/fileshares"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/fileshares"
"github.com/hashicorp/go-azure-sdk/sdk/client/pollers"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/services/storage/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package storage
import (
"sort"

"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
)

func sortedKeysFromSlice(input map[storageaccounts.Kind]struct{}) []string {
Expand Down
12 changes: 6 additions & 6 deletions internal/services/storage/parse/object_replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ import (
"strings"

"github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/objectreplicationpolicies"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/objectreplicationpolicyoperationgroup"
)

// This is manual for concat two ids are not supported in auto-generation

var _ resourceids.Id = ObjectReplicationId{}

type ObjectReplicationId struct {
Src objectreplicationpolicies.ObjectReplicationPolicyId
Dst objectreplicationpolicies.ObjectReplicationPolicyId
Src objectreplicationpolicyoperationgroup.ObjectReplicationPolicyId
Dst objectreplicationpolicyoperationgroup.ObjectReplicationPolicyId
}

func NewObjectReplicationID(srcId, dstId objectreplicationpolicies.ObjectReplicationPolicyId) ObjectReplicationId {
func NewObjectReplicationID(srcId, dstId objectreplicationpolicyoperationgroup.ObjectReplicationPolicyId) ObjectReplicationId {
return ObjectReplicationId{
Src: srcId,
Dst: dstId,
Expand All @@ -46,12 +46,12 @@ func ObjectReplicationID(input string) (*ObjectReplicationId, error) {
if len(ids) != 2 {
return nil, fmt.Errorf("storage Object Replication Id is composed as format `sourceId;destinationId`")
}
srcId, err := objectreplicationpolicies.ParseObjectReplicationPolicyID(ids[0])
srcId, err := objectreplicationpolicyoperationgroup.ParseObjectReplicationPolicyID(ids[0])
if err != nil {
return nil, err
}

dstId, err := objectreplicationpolicies.ParseObjectReplicationPolicyID(strings.TrimSuffix(ids[1], ";"))
dstId, err := objectreplicationpolicyoperationgroup.ParseObjectReplicationPolicyID(strings.TrimSuffix(ids[1], ";"))
if err != nil {
return nil, err
}
Expand Down
10 changes: 5 additions & 5 deletions internal/services/storage/parse/object_replication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ package parse
import (
"testing"

"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/objectreplicationpolicies"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/objectreplicationpolicyoperationgroup"
)

func TestObjectReplicationIDFormatter(t *testing.T) {
actual := NewObjectReplicationID(
objectreplicationpolicies.NewObjectReplicationPolicyID("12345678-1234-9876-4563-123456789012", "resGroup1", "storageAccount1", "objectReplicationPolicy1"),
objectreplicationpolicies.NewObjectReplicationPolicyID("12345678-1234-9876-4563-123456789012", "resGroup2", "storageAccount2", "objectReplicationPolicy2"),
objectreplicationpolicyoperationgroup.NewObjectReplicationPolicyID("12345678-1234-9876-4563-123456789012", "resGroup1", "storageAccount1", "objectReplicationPolicy1"),
objectreplicationpolicyoperationgroup.NewObjectReplicationPolicyID("12345678-1234-9876-4563-123456789012", "resGroup2", "storageAccount2", "objectReplicationPolicy2"),
).ID()
expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/objectReplicationPolicies/objectReplicationPolicy1;/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup2/providers/Microsoft.Storage/storageAccounts/storageAccount2/objectReplicationPolicies/objectReplicationPolicy2"
if actual != expected {
Expand Down Expand Up @@ -134,13 +134,13 @@ func TestObjectReplicationID(t *testing.T) {
// valid
Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/objectReplicationPolicies/objectReplicationPolicy1;/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup2/providers/Microsoft.Storage/storageAccounts/storageAccount2/objectReplicationPolicies/objectReplicationPolicy2",
Expected: &ObjectReplicationId{
Src: objectreplicationpolicies.ObjectReplicationPolicyId{
Src: objectreplicationpolicyoperationgroup.ObjectReplicationPolicyId{
SubscriptionId: "12345678-1234-9876-4563-123456789012",
ResourceGroupName: "resGroup1",
StorageAccountName: "storageAccount1",
ObjectReplicationPolicyId: "objectReplicationPolicy1",
},
Dst: objectreplicationpolicies.ObjectReplicationPolicyId{
Dst: objectreplicationpolicyoperationgroup.ObjectReplicationPolicyId{
SubscriptionId: "12345678-1234-9876-4563-123456789012",
ResourceGroupName: "resGroup2",
StorageAccountName: "storageAccount2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/go-azure-helpers/resourcemanager/keyvault"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
"github.com/hashicorp/terraform-plugin-framework/list"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
"github.com/hashicorp/go-uuid"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"slices"
"time"

"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
"github.com/hashicorp/go-azure-sdk/sdk/client/pollers"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/client"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/custompollers"
Expand Down
4 changes: 2 additions & 2 deletions internal/services/storage/storage_account_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/hashicorp/go-azure-helpers/resourcemanager/identity"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
Expand Down Expand Up @@ -568,7 +568,7 @@ func dataSourceStorageAccountRead(d *pluginsdk.ResourceData, meta interface{}) e
d.SetId(id.ID())

listKeysOpts := storageaccounts.DefaultListKeysOperationOptions()
listKeysOpts.Expand = pointer.To(storageaccounts.ListKeyExpandKerb)
listKeysOpts.Expand = pointer.To(storageaccounts.ExpandKerb)
keys, err := client.ListKeys(ctx, id, listKeysOpts)
if err != nil {
hasWriteLock := response.WasConflict(keys.HttpResponse)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"

"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
)

Expand Down
Loading
Loading