Skip to content

Commit 6d56a67

Browse files
authored
Storage: Upgrade API version from 2023-05-01 to 2025-06-01 (#32071)
[ENHANCEMENT] * dependencies: `storage` - update to API version `2025-06-01`
1 parent 039cc2b commit 6d56a67

File tree

524 files changed

+5705
-3172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

524 files changed

+5705
-3172
lines changed

internal/services/storage/client/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package client
66
import (
77
"fmt"
88

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

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

46-
resourceManager, err := storage_v2023_01_01.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) {
46+
resourceManager, err := storage.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) {
4747
o.Configure(c, o.Authorizers.ResourceManager)
4848
})
4949
if err != nil {

internal/services/storage/client/helpers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

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

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

7171
log.Printf("[DEBUG] Cache Miss - looking up the account key for %s..", ad.StorageAccountId)
7272
opts := storageaccounts.DefaultListKeysOperationOptions()
73-
opts.Expand = pointer.To(storageaccounts.ListKeyExpandKerb)
73+
opts.Expand = pointer.To(storageaccounts.ExpandKerb)
7474
listKeysResp, err := client.ResourceManager.StorageAccounts.ListKeys(ctx, ad.StorageAccountId, opts)
7575
if err != nil {
7676
return nil, fmt.Errorf("listing Keys for %s: %+v", ad.StorageAccountId, err)

internal/services/storage/custompollers/data_plane_file_share_availability_poller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

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

2020
type DataPlaneFileShareAvailabilityPoller struct {
21-
client *fileservice.FileServiceClient
21+
client *fileservices.FileServicesClient
2222
storageAccountId commonids.StorageAccountId
2323
}
2424

2525
func NewDataPlaneFileShareAvailabilityPoller(client *storageClients.Client, account *storageClients.AccountDetails) (*DataPlaneFileShareAvailabilityPoller, error) {
2626
return &DataPlaneFileShareAvailabilityPoller{
27-
client: client.ResourceManager.FileService,
27+
client: client.ResourceManager.FileServices,
2828
storageAccountId: account.StorageAccountId,
2929
}, nil
3030
}

internal/services/storage/custompollers/storage_share_create_poller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"time"
99

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

internal/services/storage/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package storage
66
import (
77
"sort"
88

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

1212
func sortedKeysFromSlice(input map[storageaccounts.Kind]struct{}) []string {

internal/services/storage/parse/object_replication.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ import (
88
"strings"
99

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

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

1616
var _ resourceids.Id = ObjectReplicationId{}
1717

1818
type ObjectReplicationId struct {
19-
Src objectreplicationpolicies.ObjectReplicationPolicyId
20-
Dst objectreplicationpolicies.ObjectReplicationPolicyId
19+
Src objectreplicationpolicyoperationgroup.ObjectReplicationPolicyId
20+
Dst objectreplicationpolicyoperationgroup.ObjectReplicationPolicyId
2121
}
2222

23-
func NewObjectReplicationID(srcId, dstId objectreplicationpolicies.ObjectReplicationPolicyId) ObjectReplicationId {
23+
func NewObjectReplicationID(srcId, dstId objectreplicationpolicyoperationgroup.ObjectReplicationPolicyId) ObjectReplicationId {
2424
return ObjectReplicationId{
2525
Src: srcId,
2626
Dst: dstId,
@@ -46,12 +46,12 @@ func ObjectReplicationID(input string) (*ObjectReplicationId, error) {
4646
if len(ids) != 2 {
4747
return nil, fmt.Errorf("storage Object Replication Id is composed as format `sourceId;destinationId`")
4848
}
49-
srcId, err := objectreplicationpolicies.ParseObjectReplicationPolicyID(ids[0])
49+
srcId, err := objectreplicationpolicyoperationgroup.ParseObjectReplicationPolicyID(ids[0])
5050
if err != nil {
5151
return nil, err
5252
}
5353

54-
dstId, err := objectreplicationpolicies.ParseObjectReplicationPolicyID(strings.TrimSuffix(ids[1], ";"))
54+
dstId, err := objectreplicationpolicyoperationgroup.ParseObjectReplicationPolicyID(strings.TrimSuffix(ids[1], ";"))
5555
if err != nil {
5656
return nil, err
5757
}

internal/services/storage/parse/object_replication_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ package parse
88
import (
99
"testing"
1010

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

1414
func TestObjectReplicationIDFormatter(t *testing.T) {
1515
actual := NewObjectReplicationID(
16-
objectreplicationpolicies.NewObjectReplicationPolicyID("12345678-1234-9876-4563-123456789012", "resGroup1", "storageAccount1", "objectReplicationPolicy1"),
17-
objectreplicationpolicies.NewObjectReplicationPolicyID("12345678-1234-9876-4563-123456789012", "resGroup2", "storageAccount2", "objectReplicationPolicy2"),
16+
objectreplicationpolicyoperationgroup.NewObjectReplicationPolicyID("12345678-1234-9876-4563-123456789012", "resGroup1", "storageAccount1", "objectReplicationPolicy1"),
17+
objectreplicationpolicyoperationgroup.NewObjectReplicationPolicyID("12345678-1234-9876-4563-123456789012", "resGroup2", "storageAccount2", "objectReplicationPolicy2"),
1818
).ID()
1919
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"
2020
if actual != expected {
@@ -134,13 +134,13 @@ func TestObjectReplicationID(t *testing.T) {
134134
// valid
135135
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",
136136
Expected: &ObjectReplicationId{
137-
Src: objectreplicationpolicies.ObjectReplicationPolicyId{
137+
Src: objectreplicationpolicyoperationgroup.ObjectReplicationPolicyId{
138138
SubscriptionId: "12345678-1234-9876-4563-123456789012",
139139
ResourceGroupName: "resGroup1",
140140
StorageAccountName: "storageAccount1",
141141
ObjectReplicationPolicyId: "objectReplicationPolicy1",
142142
},
143-
Dst: objectreplicationpolicies.ObjectReplicationPolicyId{
143+
Dst: objectreplicationpolicyoperationgroup.ObjectReplicationPolicyId{
144144
SubscriptionId: "12345678-1234-9876-4563-123456789012",
145145
ResourceGroupName: "resGroup2",
146146
StorageAccountName: "storageAccount2",

internal/services/storage/storage_account_customer_managed_key_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/hashicorp/go-azure-helpers/lang/response"
1414
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
1515
"github.com/hashicorp/go-azure-helpers/resourcemanager/keyvault"
16-
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
16+
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
1717
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1818
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
1919
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"

internal/services/storage/storage_account_customer_managed_key_resource_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/hashicorp/go-azure-helpers/lang/pointer"
88
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
9-
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
9+
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
1010
"github.com/hashicorp/terraform-plugin-framework/list"
1111
"github.com/hashicorp/terraform-plugin-framework/resource"
1212
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"

internal/services/storage/storage_account_customer_managed_key_resource_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/hashicorp/go-azure-helpers/lang/pointer"
1414
"github.com/hashicorp/go-azure-helpers/lang/response"
1515
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
16-
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts"
16+
"github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01/storageaccounts"
1717
"github.com/hashicorp/go-uuid"
1818
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
1919
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"

0 commit comments

Comments
 (0)