Skip to content

Commit 1132dd1

Browse files
New Resource: azurerm_storage_discovery_workspace
Made-with: Cursor
1 parent 040b282 commit 1132dd1

33 files changed

+2082
-9
lines changed

.github/labeler-issue-triage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ service/spring:
324324
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(spring_cloud_accelerator\W+|spring_cloud_active_deployment\W+|spring_cloud_api_portal\W+|spring_cloud_api_portal_custom_domain\W+|spring_cloud_app\W+|spring_cloud_app_cosmosdb_association\W+|spring_cloud_app_dynamics_application_performance_monitoring\W+|spring_cloud_app_mysql_association\W+|spring_cloud_app_redis_association\W+|spring_cloud_application_insights_application_performance_monitoring\W+|spring_cloud_application_live_view\W+|spring_cloud_build_deployment\W+|spring_cloud_build_pack_binding\W+|spring_cloud_builder\W+|spring_cloud_certificate\W+|spring_cloud_configuration_service\W+|spring_cloud_container_deployment\W+|spring_cloud_custom_domain\W+|spring_cloud_customized_accelerator\W+|spring_cloud_dev_tool_portal\W+|spring_cloud_dynatrace_application_performance_monitoring\W+|spring_cloud_elastic_application_performance_monitoring\W+|spring_cloud_gateway\W+|spring_cloud_gateway_custom_domain\W+|spring_cloud_gateway_route_config\W+|spring_cloud_java_deployment\W+|spring_cloud_new_relic_application_performance_monitoring\W+|spring_cloud_service\W+|spring_cloud_storage\W+)((.|\n)*)###'
325325

326326
service/storage:
327-
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(managed_lustre_file_system|storage_account\W+|storage_account_blob_container_sas\W+|storage_account_customer_managed_key\W+|storage_account_local_user\W+|storage_account_network_rules\W+|storage_account_queue_properties\W+|storage_account_sas\W+|storage_account_static_website\W+|storage_blob\W+|storage_blob_inventory_policy\W+|storage_container\W+|storage_container_immutability_policy\W+|storage_containers\W+|storage_data_lake_gen2_filesystem\W+|storage_data_lake_gen2_path\W+|storage_encryption_scope\W+|storage_management_policy\W+|storage_object_replication\W+|storage_queue\W+|storage_share\W+|storage_share_directory\W+|storage_share_file\W+|storage_sync\W+|storage_sync_cloud_endpoint\W+|storage_sync_group\W+|storage_sync_server_endpoint\W+|storage_table\W+|storage_table\W+|storage_table_entities\W+|storage_table_entity\W+)((.|\n)*)###'
327+
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(managed_lustre_file_system|storage_account\W+|storage_account_blob_container_sas\W+|storage_account_customer_managed_key\W+|storage_account_local_user\W+|storage_account_network_rules\W+|storage_account_queue_properties\W+|storage_account_sas\W+|storage_account_static_website\W+|storage_blob\W+|storage_blob_inventory_policy\W+|storage_container\W+|storage_container_immutability_policy\W+|storage_containers\W+|storage_data_lake_gen2_filesystem\W+|storage_data_lake_gen2_path\W+|storage_discovery_workspace\W+|storage_encryption_scope\W+|storage_management_policy\W+|storage_object_replication\W+|storage_queue\W+|storage_share\W+|storage_share_directory\W+|storage_share_file\W+|storage_sync\W+|storage_sync_cloud_endpoint\W+|storage_sync_group\W+|storage_sync_server_endpoint\W+|storage_table\W+|storage_table\W+|storage_table_entities\W+|storage_table_entity\W+)((.|\n)*)###'
328328

329329
service/storagemover:
330330
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_storage_mover((.|\n)*)###'

internal/services/storage/client/client.go

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

99
storage "github.com/hashicorp/go-azure-sdk/resource-manager/storage/2025-06-01"
10+
"github.com/hashicorp/go-azure-sdk/resource-manager/storagediscovery/2025-09-01/storagediscoveryworkspaces"
1011
"github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource"
1112
"github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/registeredserverresource"
1213
"github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/serverendpointresource"
@@ -23,7 +24,8 @@ var StorageDomainSuffix *string
2324
type Client struct {
2425
StorageDomainSuffix string
2526

26-
ResourceManager *storage.Client
27+
ResourceManager *storage.Client
28+
StorageDiscoveryWorkspacesClient *storagediscoveryworkspaces.StorageDiscoveryWorkspacesClient
2729
// TODO: import the Storage Sync Meta Client and use that
2830
SyncCloudEndpointsClient *cloudendpointresource.CloudEndpointResourceClient
2931
SyncGroupsClient *syncgroupresource.SyncGroupResourceClient
@@ -80,15 +82,22 @@ func NewClient(o *common.ClientOptions) (*Client, error) {
8082
}
8183
o.Configure(syncGroupsClient.Client, o.Authorizers.ResourceManager)
8284

85+
storageDiscoveryWorkspacesClient, err := storagediscoveryworkspaces.NewStorageDiscoveryWorkspacesClientWithBaseURI(o.Environment.ResourceManager)
86+
if err != nil {
87+
return nil, fmt.Errorf("building StorageDiscoveryWorkspaces client: %+v", err)
88+
}
89+
o.Configure(storageDiscoveryWorkspacesClient.Client, o.Authorizers.ResourceManager)
90+
8391
// TODO: switch Storage Containers to using the storage.BlobContainersClient
8492
// (which should fix #2977) when the storage clients have been moved in here
8593
client := Client{
86-
ResourceManager: resourceManager,
87-
SyncCloudEndpointsClient: syncCloudEndpointsClient,
88-
SyncRegisteredServerClient: syncRegisteredServersClient,
89-
SyncServerEndpointsClient: syncServerEndpointClient,
90-
SyncServiceClient: syncServiceClient,
91-
SyncGroupsClient: syncGroupsClient,
94+
ResourceManager: resourceManager,
95+
StorageDiscoveryWorkspacesClient: storageDiscoveryWorkspacesClient,
96+
SyncCloudEndpointsClient: syncCloudEndpointsClient,
97+
SyncRegisteredServerClient: syncRegisteredServersClient,
98+
SyncServerEndpointsClient: syncServerEndpointClient,
99+
SyncServiceClient: syncServiceClient,
100+
SyncGroupsClient: syncGroupsClient,
92101

93102
StorageDomainSuffix: *storageSuffix,
94103
}

internal/services/storage/registration.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ func (r Registration) SupportedResources() map[string]*pluginsdk.Resource {
6060
"azurerm_storage_blob": resourceStorageBlob(),
6161
"azurerm_storage_blob_inventory_policy": resourceStorageBlobInventoryPolicy(),
6262
"azurerm_storage_container": resourceStorageContainer(),
63-
"azurerm_storage_encryption_scope": resourceStorageEncryptionScope(),
6463
"azurerm_storage_data_lake_gen2_filesystem": resourceStorageDataLakeGen2FileSystem(),
6564
"azurerm_storage_data_lake_gen2_path": resourceStorageDataLakeGen2Path(),
65+
"azurerm_storage_encryption_scope": resourceStorageEncryptionScope(),
6666
"azurerm_storage_management_policy": resourceStorageManagementPolicy(),
6767
"azurerm_storage_object_replication": resourceStorageObjectReplication(),
6868
"azurerm_storage_queue": resourceStorageQueue(),
@@ -91,6 +91,7 @@ func (r Registration) Resources() []sdk.Resource {
9191
AccountStaticWebsiteResource{},
9292
LocalUserResource{},
9393
StorageContainerImmutabilityPolicyResource{},
94+
StorageDiscoveryWorkspaceResource{},
9495
SyncServerEndpointResource{},
9596
}
9697
}

0 commit comments

Comments
 (0)