diff --git a/helpers/azure/resource_group.go b/helpers/azure/resource_group.go index 0947fa24c26f..e449f53237f9 100644 --- a/helpers/azure/resource_group.go +++ b/helpers/azure/resource_group.go @@ -28,6 +28,7 @@ func SchemaResourceGroupNameDiffSuppress() *pluginsdk.Schema { } } +// Deprecated: use `commonschema.ResourceGroupNameForDataSource()` instead func SchemaResourceGroupNameForDataSource() *pluginsdk.Schema { return &pluginsdk.Schema{ Type: pluginsdk.TypeString, diff --git a/internal/services/aadb2c/aadb2c_directory_data_source.go b/internal/services/aadb2c/aadb2c_directory_data_source.go index da4fa38d24d3..23f3d39ce351 100644 --- a/internal/services/aadb2c/aadb2c_directory_data_source.go +++ b/internal/services/aadb2c/aadb2c_directory_data_source.go @@ -6,7 +6,7 @@ import ( "net/http" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/aadb2c/sdk/2021-04-01-preview/tenants" "github.com/hashicorp/terraform-provider-azurerm/internal/services/aadb2c/validate" @@ -51,7 +51,7 @@ func (r AadB2cDirectoryDataSource) Arguments() map[string]*pluginsdk.Schema { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), } } diff --git a/internal/services/apimanagement/api_management_api_data_source.go b/internal/services/apimanagement/api_management_api_data_source.go index f8e0c9ef30cd..25bd95d971c4 100644 --- a/internal/services/apimanagement/api_management_api_data_source.go +++ b/internal/services/apimanagement/api_management_api_data_source.go @@ -5,7 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2021-08-01/apimanagement" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/schemaz" @@ -33,7 +33,7 @@ func dataSourceApiManagementApi() *pluginsdk.Resource { "api_management_name": schemaz.SchemaApiManagementDataSourceName(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "revision": { Type: pluginsdk.TypeString, diff --git a/internal/services/apimanagement/api_management_api_version_set_data_source.go b/internal/services/apimanagement/api_management_api_version_set_data_source.go index b98c7b90e4d8..15e2985a046f 100644 --- a/internal/services/apimanagement/api_management_api_version_set_data_source.go +++ b/internal/services/apimanagement/api_management_api_version_set_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/schemaz" @@ -24,7 +24,7 @@ func dataSourceApiManagementApiVersionSet() *pluginsdk.Resource { Schema: map[string]*pluginsdk.Schema{ "name": schemaz.SchemaApiManagementChildDataSourceName(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "api_management_name": schemaz.SchemaApiManagementDataSourceName(), diff --git a/internal/services/apimanagement/api_management_group_data_source.go b/internal/services/apimanagement/api_management_group_data_source.go index d4744a6caf83..09f6d80ddce5 100644 --- a/internal/services/apimanagement/api_management_group_data_source.go +++ b/internal/services/apimanagement/api_management_group_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/schemaz" @@ -24,7 +24,7 @@ func dataSourceApiManagementGroup() *pluginsdk.Resource { Schema: map[string]*pluginsdk.Schema{ "name": schemaz.SchemaApiManagementChildDataSourceName(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "api_management_name": schemaz.SchemaApiManagementDataSourceName(), diff --git a/internal/services/apimanagement/api_management_user_data_source.go b/internal/services/apimanagement/api_management_user_data_source.go index b1280e16cd6a..4f41bab176c5 100644 --- a/internal/services/apimanagement/api_management_user_data_source.go +++ b/internal/services/apimanagement/api_management_user_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/schemaz" @@ -26,7 +26,7 @@ func dataSourceApiManagementUser() *pluginsdk.Resource { "api_management_name": schemaz.SchemaApiManagementDataSourceName(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "first_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/appconfiguration/app_configuration_data_source.go b/internal/services/appconfiguration/app_configuration_data_source.go index de8bcb23b0e2..24ad93017d54 100644 --- a/internal/services/appconfiguration/app_configuration_data_source.go +++ b/internal/services/appconfiguration/app_configuration_data_source.go @@ -31,7 +31,7 @@ func dataSourceAppConfiguration() *pluginsdk.Resource { ValidateFunc: validate.ConfigurationStoreName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/applicationinsights/application_insights_data_source.go b/internal/services/applicationinsights/application_insights_data_source.go index a4f8501e37b1..6c3c279f3ffb 100644 --- a/internal/services/applicationinsights/application_insights_data_source.go +++ b/internal/services/applicationinsights/application_insights_data_source.go @@ -4,8 +4,8 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/applicationinsights/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -24,7 +24,7 @@ func dataSourceApplicationInsights() *pluginsdk.Resource { }, Schema: map[string]*pluginsdk.Schema{ - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "name": { Type: pluginsdk.TypeString, diff --git a/internal/services/appservice/linux_function_app_data_source.go b/internal/services/appservice/linux_function_app_data_source.go index 70f66a9f39c5..2abda7d823e7 100644 --- a/internal/services/appservice/linux_function_app_data_source.go +++ b/internal/services/appservice/linux_function_app_data_source.go @@ -10,7 +10,6 @@ import ( "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-02-01/web" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/parse" @@ -78,7 +77,7 @@ func (d LinuxFunctionAppDataSource) Arguments() map[string]*pluginsdk.Schema { ValidateFunc: validate.WebAppName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), } } diff --git a/internal/services/appservice/linux_web_app_data_source.go b/internal/services/appservice/linux_web_app_data_source.go index 62d50a4e8500..481d290e9d1f 100644 --- a/internal/services/appservice/linux_web_app_data_source.go +++ b/internal/services/appservice/linux_web_app_data_source.go @@ -8,7 +8,6 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/parse" @@ -68,7 +67,7 @@ func (r LinuxWebAppDataSource) Arguments() map[string]*pluginsdk.Schema { ValidateFunc: validate.WebAppName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), } } diff --git a/internal/services/appservice/service_plan_data_source.go b/internal/services/appservice/service_plan_data_source.go index f637d019baff..51346febe5d7 100644 --- a/internal/services/appservice/service_plan_data_source.go +++ b/internal/services/appservice/service_plan_data_source.go @@ -7,7 +7,6 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" @@ -51,7 +50,7 @@ func (r ServicePlanDataSource) Arguments() map[string]*pluginsdk.Schema { ValidateFunc: validate.ServicePlanName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), } } diff --git a/internal/services/appservice/windows_function_app_data_source.go b/internal/services/appservice/windows_function_app_data_source.go index 7fc7b1ae2512..a258ae00151a 100644 --- a/internal/services/appservice/windows_function_app_data_source.go +++ b/internal/services/appservice/windows_function_app_data_source.go @@ -10,7 +10,6 @@ import ( "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-02-01/web" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/parse" @@ -76,7 +75,7 @@ func (d WindowsFunctionAppDataSource) Arguments() map[string]*pluginsdk.Schema { ValidateFunc: validate.WebAppName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), } } diff --git a/internal/services/appservice/windows_web_app_data_source.go b/internal/services/appservice/windows_web_app_data_source.go index 0379c4b95ecf..d22432c05843 100644 --- a/internal/services/appservice/windows_web_app_data_source.go +++ b/internal/services/appservice/windows_web_app_data_source.go @@ -8,7 +8,6 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/parse" @@ -66,7 +65,7 @@ func (d WindowsWebAppDataSource) Arguments() map[string]*pluginsdk.Schema { ValidateFunc: validate.WebAppName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), } } diff --git a/internal/services/attestation/attestation_provider_data_source.go b/internal/services/attestation/attestation_provider_data_source.go index 58286d230038..9cd662fb8ad6 100644 --- a/internal/services/attestation/attestation_provider_data_source.go +++ b/internal/services/attestation/attestation_provider_data_source.go @@ -30,7 +30,7 @@ func dataSourceAttestationProvider() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/automation/automation_account_data_source.go b/internal/services/automation/automation_account_data_source.go index 0ba66bb7ae37..e5646692b0dc 100644 --- a/internal/services/automation/automation_account_data_source.go +++ b/internal/services/automation/automation_account_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/automation/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -26,7 +26,7 @@ func dataSourceAutomationAccount() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "primary_key": { Type: pluginsdk.TypeString, diff --git a/internal/services/batch/batch_account_data_source.go b/internal/services/batch/batch_account_data_source.go index 5f22b0cb1af6..55c1c1507447 100644 --- a/internal/services/batch/batch_account_data_source.go +++ b/internal/services/batch/batch_account_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2021-06-01/batch" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/batch/parse" @@ -29,7 +30,7 @@ func dataSourceBatchAccount() *pluginsdk.Resource { Required: true, ValidateFunc: validate.AccountName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), "storage_account_id": { Type: pluginsdk.TypeString, diff --git a/internal/services/batch/batch_application_data_source.go b/internal/services/batch/batch_application_data_source.go index f3675a7eb5a6..77758c9938c8 100644 --- a/internal/services/batch/batch_application_data_source.go +++ b/internal/services/batch/batch_application_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/batch/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/batch/validate" @@ -28,7 +28,7 @@ func dataSourceBatchApplication() *pluginsdk.Resource { ValidateFunc: validate.ApplicationName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "account_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/batch/batch_certificate_data_source.go b/internal/services/batch/batch_certificate_data_source.go index f24a0ffe02b0..8a88a7cc977d 100644 --- a/internal/services/batch/batch_certificate_data_source.go +++ b/internal/services/batch/batch_certificate_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/batch/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/batch/validate" @@ -34,7 +34,7 @@ func dataSourceBatchCertificate() *pluginsdk.Resource { ValidateFunc: validate.AccountName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "public_data": { Type: pluginsdk.TypeString, diff --git a/internal/services/batch/batch_pool_data_source.go b/internal/services/batch/batch_pool_data_source.go index afee7895d35b..05fd0b33551c 100644 --- a/internal/services/batch/batch_pool_data_source.go +++ b/internal/services/batch/batch_pool_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/batch/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/batch/validate" @@ -27,7 +27,7 @@ func dataSourceBatchPool() *pluginsdk.Resource { Required: true, ValidateFunc: validate.PoolName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "account_name": { Type: pluginsdk.TypeString, Required: true, diff --git a/internal/services/cdn/cdn_profile_data_source.go b/internal/services/cdn/cdn_profile_data_source.go index 9e046532c5b9..5a1b1ff5aaf7 100644 --- a/internal/services/cdn/cdn_profile_data_source.go +++ b/internal/services/cdn/cdn_profile_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/cdn/parse" @@ -27,7 +28,7 @@ func dataSourceCdnProfile() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/cognitive/cognitive_account_data_source.go b/internal/services/cognitive/cognitive_account_data_source.go index 456e11fbd688..993b4fc4a703 100644 --- a/internal/services/cognitive/cognitive_account_data_source.go +++ b/internal/services/cognitive/cognitive_account_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -28,7 +29,7 @@ func dataSourceCognitiveAccount() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/compute/availability_set_data_source.go b/internal/services/compute/availability_set_data_source.go index eff1f90566dc..7836f9e6c75b 100644 --- a/internal/services/compute/availability_set_data_source.go +++ b/internal/services/compute/availability_set_data_source.go @@ -6,6 +6,7 @@ import ( "strings" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" @@ -25,7 +26,7 @@ func dataSourceAvailabilitySet() *pluginsdk.Resource { }, Schema: map[string]*pluginsdk.Schema{ - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "name": { Type: pluginsdk.TypeString, diff --git a/internal/services/compute/dedicated_host_data_source.go b/internal/services/compute/dedicated_host_data_source.go index 876afbc9a164..e34a3dd5ce58 100644 --- a/internal/services/compute/dedicated_host_data_source.go +++ b/internal/services/compute/dedicated_host_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" @@ -35,7 +36,7 @@ func dataSourceDedicatedHost() *pluginsdk.Resource { ValidateFunc: validate.DedicatedHostGroupName(), }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/compute/disk_access_data_source.go b/internal/services/compute/disk_access_data_source.go index f900ff2ade17..098874a34e2a 100644 --- a/internal/services/compute/disk_access_data_source.go +++ b/internal/services/compute/disk_access_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -27,7 +27,7 @@ func dataSourceDiskAccess() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "tags": tags.Schema(), }, diff --git a/internal/services/compute/disk_encryption_set_data_source.go b/internal/services/compute/disk_encryption_set_data_source.go index 85e23969c648..0297368f306b 100644 --- a/internal/services/compute/disk_encryption_set_data_source.go +++ b/internal/services/compute/disk_encryption_set_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" @@ -31,7 +32,7 @@ func dataSourceDiskEncryptionSet() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "auto_key_rotation_enabled": { Type: pluginsdk.TypeBool, diff --git a/internal/services/compute/image_data_source.go b/internal/services/compute/image_data_source.go index b17aeab0ce88..0569982e0ddf 100644 --- a/internal/services/compute/image_data_source.go +++ b/internal/services/compute/image_data_source.go @@ -8,6 +8,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" @@ -45,7 +46,7 @@ func dataSourceImage() *pluginsdk.Resource { ExactlyOneOf: []string{"name", "name_regex"}, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/compute/images_data_source.go b/internal/services/compute/images_data_source.go index 373b5a9880d9..3a83e0b3216e 100644 --- a/internal/services/compute/images_data_source.go +++ b/internal/services/compute/images_data_source.go @@ -8,7 +8,6 @@ import ( "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -25,7 +24,7 @@ func dataSourceImages() *pluginsdk.Resource { }, Schema: map[string]*pluginsdk.Schema{ - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "tags_filter": tags.Schema(), diff --git a/internal/services/compute/proximity_placement_group_data_source.go b/internal/services/compute/proximity_placement_group_data_source.go index 8b12174b45c6..ea9501124363 100644 --- a/internal/services/compute/proximity_placement_group_data_source.go +++ b/internal/services/compute/proximity_placement_group_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" @@ -29,7 +30,7 @@ func dataSourceProximityPlacementGroup() *pluginsdk.Resource { ValidateFunc: validation.NoZeroValues, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/compute/shared_image_data_source.go b/internal/services/compute/shared_image_data_source.go index 60df8aad3e7e..b1a77ab8133f 100644 --- a/internal/services/compute/shared_image_data_source.go +++ b/internal/services/compute/shared_image_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" @@ -38,7 +39,7 @@ func dataSourceSharedImage() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "os_type": { Type: pluginsdk.TypeString, diff --git a/internal/services/compute/shared_image_gallery_data_source.go b/internal/services/compute/shared_image_gallery_data_source.go index de4fa764a2ee..30df06a20f9e 100644 --- a/internal/services/compute/shared_image_gallery_data_source.go +++ b/internal/services/compute/shared_image_gallery_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" @@ -29,7 +30,7 @@ func dataSourceSharedImageGallery() *pluginsdk.Resource { ValidateFunc: validate.SharedImageGalleryName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/compute/shared_image_version_data_source.go b/internal/services/compute/shared_image_version_data_source.go index 9d36735af87f..830a26502c8d 100644 --- a/internal/services/compute/shared_image_version_data_source.go +++ b/internal/services/compute/shared_image_version_data_source.go @@ -6,6 +6,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" @@ -45,7 +46,7 @@ func dataSourceSharedImageVersion() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "managed_image_id": { Type: pluginsdk.TypeString, diff --git a/internal/services/compute/shared_image_versions_data_source.go b/internal/services/compute/shared_image_versions_data_source.go index bd1cb68c2967..aa38aaee7cdb 100644 --- a/internal/services/compute/shared_image_versions_data_source.go +++ b/internal/services/compute/shared_image_versions_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" @@ -35,7 +36,7 @@ func dataSourceSharedImageVersions() *pluginsdk.Resource { ValidateFunc: validate.SharedImageName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "tags_filter": tags.Schema(), diff --git a/internal/services/compute/snapshot_data_source.go b/internal/services/compute/snapshot_data_source.go index 07054c6d18ac..d088865afaff 100644 --- a/internal/services/compute/snapshot_data_source.go +++ b/internal/services/compute/snapshot_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -26,7 +26,7 @@ func dataSourceSnapshot() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), // Computed "os_type": { diff --git a/internal/services/compute/ssh_public_key_data_source.go b/internal/services/compute/ssh_public_key_data_source.go index 90eb7e0986b3..84e13f26e5d8 100644 --- a/internal/services/compute/ssh_public_key_data_source.go +++ b/internal/services/compute/ssh_public_key_data_source.go @@ -5,7 +5,7 @@ import ( "regexp" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -33,7 +33,7 @@ func dataSourceSshPublicKey() *pluginsdk.Resource { ), }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "public_key": { Type: pluginsdk.TypeString, diff --git a/internal/services/compute/virtual_machine_data_source.go b/internal/services/compute/virtual_machine_data_source.go index daf49ae6f65f..63c0e0a6d15c 100644 --- a/internal/services/compute/virtual_machine_data_source.go +++ b/internal/services/compute/virtual_machine_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" @@ -28,7 +29,7 @@ func dataSourceVirtualMachine() *pluginsdk.Resource { ValidateFunc: validation.NoZeroValues, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/compute/virtual_machine_scale_set_data_source.go b/internal/services/compute/virtual_machine_scale_set_data_source.go index ee39f995c1aa..b34a597d3f96 100644 --- a/internal/services/compute/virtual_machine_scale_set_data_source.go +++ b/internal/services/compute/virtual_machine_scale_set_data_source.go @@ -30,7 +30,7 @@ func dataSourceVirtualMachineScaleSet() *pluginsdk.Resource { ValidateFunc: validation.NoZeroValues, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/containers/container_group_data_source.go b/internal/services/containers/container_group_data_source.go index 4fd8ed74ac45..dbf08224cc7a 100644 --- a/internal/services/containers/container_group_data_source.go +++ b/internal/services/containers/container_group_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/parse" @@ -29,7 +30,7 @@ func dataSourceContainerGroup() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/containers/container_registry_data_source.go b/internal/services/containers/container_registry_data_source.go index e222ae8bc4ac..da6e59cb157b 100644 --- a/internal/services/containers/container_registry_data_source.go +++ b/internal/services/containers/container_registry_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/features" @@ -87,7 +88,7 @@ func dataSourceContainerRegistrySchema() map[string]*pluginsdk.Schema { ValidateFunc: validate.ContainerRegistryName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/containers/container_registry_scope_map_data_source.go b/internal/services/containers/container_registry_scope_map_data_source.go index 4c30c854ba2a..01065785bf92 100644 --- a/internal/services/containers/container_registry_scope_map_data_source.go +++ b/internal/services/containers/container_registry_scope_map_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/validate" @@ -31,7 +31,7 @@ func dataSourceContainerRegistryScopeMap() *pluginsdk.Resource { Required: true, ValidateFunc: validate.ContainerRegistryName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "description": { Type: pluginsdk.TypeString, Computed: true, diff --git a/internal/services/containers/container_registry_token_data_source.go b/internal/services/containers/container_registry_token_data_source.go index 1bf8896c988b..faad60026da5 100644 --- a/internal/services/containers/container_registry_token_data_source.go +++ b/internal/services/containers/container_registry_token_data_source.go @@ -5,7 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2021-08-01-preview/containerregistry" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/validate" @@ -35,7 +35,7 @@ func dataSourceContainerRegistryToken() *pluginsdk.Resource { ValidateFunc: validate.ContainerRegistryName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "scope_map_id": { Type: pluginsdk.TypeString, diff --git a/internal/services/cosmos/cosmosdb_account_data_source.go b/internal/services/cosmos/cosmosdb_account_data_source.go index 15f6e3dbc5e1..61f0eda93113 100644 --- a/internal/services/cosmos/cosmosdb_account_data_source.go +++ b/internal/services/cosmos/cosmosdb_account_data_source.go @@ -7,6 +7,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2021-10-15/documentdb" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/common" @@ -31,7 +32,7 @@ func dataSourceCosmosDbAccount() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/cosmos/cosmosdb_mongo_database_data_source.go b/internal/services/cosmos/cosmosdb_mongo_database_data_source.go index d617abcc24b1..fcabe400c349 100644 --- a/internal/services/cosmos/cosmosdb_mongo_database_data_source.go +++ b/internal/services/cosmos/cosmosdb_mongo_database_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/validate" @@ -36,7 +36,7 @@ func dataSourceCosmosDbMongoDatabase() *pluginsdk.Resource { ValidateFunc: validate.CosmosAccountName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "tags": tags.SchemaDataSource(), }, diff --git a/internal/services/databasemigration/database_migration_project_data_source.go b/internal/services/databasemigration/database_migration_project_data_source.go index d5691b8ccacb..224c69d2f825 100644 --- a/internal/services/databasemigration/database_migration_project_data_source.go +++ b/internal/services/databasemigration/database_migration_project_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -36,7 +37,7 @@ func dataSourceDatabaseMigrationProject() *pluginsdk.Resource { ValidateFunc: validate.ServiceName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/databasemigration/database_migration_service_data_source.go b/internal/services/databasemigration/database_migration_service_data_source.go index b4ef40c4ecbc..1d054841fe4f 100644 --- a/internal/services/databasemigration/database_migration_service_data_source.go +++ b/internal/services/databasemigration/database_migration_service_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -30,7 +31,7 @@ func dataSourceDatabaseMigrationService() *pluginsdk.Resource { ValidateFunc: validate.ServiceName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/datafactory/data_factory_data_source.go b/internal/services/datafactory/data_factory_data_source.go index e1cb3e782a71..dcffe1579e3b 100644 --- a/internal/services/datafactory/data_factory_data_source.go +++ b/internal/services/datafactory/data_factory_data_source.go @@ -35,7 +35,7 @@ func dataSourceDataFactory() *pluginsdk.Resource { ), }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/devtestlabs/dev_test_lab_data_source.go b/internal/services/devtestlabs/dev_test_lab_data_source.go index 04e77e729a22..bb08db1c9615 100644 --- a/internal/services/devtestlabs/dev_test_lab_data_source.go +++ b/internal/services/devtestlabs/dev_test_lab_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/devtestlabs/parse" @@ -31,7 +32,7 @@ func dataSourceDevTestLab() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "storage_type": { Type: pluginsdk.TypeString, diff --git a/internal/services/devtestlabs/dev_test_virtual_network_data_source.go b/internal/services/devtestlabs/dev_test_virtual_network_data_source.go index 2b9803fc413e..cb5fb01f4852 100644 --- a/internal/services/devtestlabs/dev_test_virtual_network_data_source.go +++ b/internal/services/devtestlabs/dev_test_virtual_network_data_source.go @@ -5,7 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2018-09-15/dtl" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/devtestlabs/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/devtestlabs/validate" @@ -36,7 +36,7 @@ func dataSourceArmDevTestVirtualNetwork() *pluginsdk.Resource { ValidateFunc: validate.DevTestLabName(), }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "unique_identifier": { Type: pluginsdk.TypeString, diff --git a/internal/services/digitaltwins/digital_twins_instance_data_source.go b/internal/services/digitaltwins/digital_twins_instance_data_source.go index c1409bce3f66..9ce837f18239 100644 --- a/internal/services/digitaltwins/digital_twins_instance_data_source.go +++ b/internal/services/digitaltwins/digital_twins_instance_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -30,7 +31,7 @@ func dataSourceDigitalTwinsInstance() *pluginsdk.Resource { ValidateFunc: validate.DigitalTwinsInstanceName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/domainservices/active_directory_domain_service_data_source.go b/internal/services/domainservices/active_directory_domain_service_data_source.go index 571e3c60a021..4201f1d786be 100644 --- a/internal/services/domainservices/active_directory_domain_service_data_source.go +++ b/internal/services/domainservices/active_directory_domain_service_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2020-01-01/aad" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -29,7 +30,7 @@ func dataSourceActiveDirectoryDomainService() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotWhiteSpace, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "deployment_id": { Type: pluginsdk.TypeString, diff --git a/internal/services/eventgrid/eventgrid_domain_data_source.go b/internal/services/eventgrid/eventgrid_domain_data_source.go index 2c6b1314fd9a..efa4e9f98ee3 100644 --- a/internal/services/eventgrid/eventgrid_domain_data_source.go +++ b/internal/services/eventgrid/eventgrid_domain_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventgrid/parse" @@ -31,7 +32,7 @@ func dataSourceEventGridDomain() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "input_schema": { Type: pluginsdk.TypeString, diff --git a/internal/services/eventgrid/eventgrid_domain_topic_data_source.go b/internal/services/eventgrid/eventgrid_domain_topic_data_source.go index 8a2f7c54b13f..265dde0858a7 100644 --- a/internal/services/eventgrid/eventgrid_domain_topic_data_source.go +++ b/internal/services/eventgrid/eventgrid_domain_topic_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventgrid/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -34,7 +34,7 @@ func dataSourceEventGridDomainTopic() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), }, } } diff --git a/internal/services/eventgrid/eventgrid_topic_data_source.go b/internal/services/eventgrid/eventgrid_topic_data_source.go index 6a3a88a06997..a9e23a5ecfb4 100644 --- a/internal/services/eventgrid/eventgrid_topic_data_source.go +++ b/internal/services/eventgrid/eventgrid_topic_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventgrid/parse" @@ -31,7 +32,7 @@ func dataSourceEventGridTopic() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "endpoint": { Type: pluginsdk.TypeString, diff --git a/internal/services/eventhub/eventhub_authorization_rule_data_source.go b/internal/services/eventhub/eventhub_authorization_rule_data_source.go index 0ff5a28d236d..fe0c64a08030 100644 --- a/internal/services/eventhub/eventhub_authorization_rule_data_source.go +++ b/internal/services/eventhub/eventhub_authorization_rule_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventhub/sdk/2017-04-01/authorizationruleseventhubs" @@ -65,7 +66,7 @@ func EventHubAuthorizationRuleDataSource() *pluginsdk.Resource { Sensitive: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), }), diff --git a/internal/services/eventhub/eventhub_consumer_group_data_source.go b/internal/services/eventhub/eventhub_consumer_group_data_source.go index 08f6935a1ada..e10b41b0d053 100644 --- a/internal/services/eventhub/eventhub_consumer_group_data_source.go +++ b/internal/services/eventhub/eventhub_consumer_group_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventhub/sdk/2017-04-01/consumergroups" @@ -44,7 +45,7 @@ func EventHubConsumerGroupDataSource() *pluginsdk.Resource { ValidateFunc: validate.ValidateEventHubName(), }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/eventhub/eventhub_data_source.go b/internal/services/eventhub/eventhub_data_source.go index d0b362a1b3f6..ff9265240532 100644 --- a/internal/services/eventhub/eventhub_data_source.go +++ b/internal/services/eventhub/eventhub_data_source.go @@ -5,7 +5,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventhub/sdk/2017-04-01/eventhubs" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -31,7 +31,7 @@ func dataSourceEventHub() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "partition_count": { Type: pluginsdk.TypeInt, diff --git a/internal/services/eventhub/eventhub_namespace_authorization_rule_data_source.go b/internal/services/eventhub/eventhub_namespace_authorization_rule_data_source.go index d2bbfad54f43..c5b9cb3ceff4 100644 --- a/internal/services/eventhub/eventhub_namespace_authorization_rule_data_source.go +++ b/internal/services/eventhub/eventhub_namespace_authorization_rule_data_source.go @@ -5,7 +5,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventhub/sdk/2017-04-01/authorizationrulesnamespaces" "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventhub/validate" @@ -34,7 +34,7 @@ func EventHubNamespaceDataSourceAuthorizationRule() *pluginsdk.Resource { ValidateFunc: validate.ValidateEventHubNamespaceName(), }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "listen": { Type: pluginsdk.TypeBool, diff --git a/internal/services/firewall/firewall_policy_data_source.go b/internal/services/firewall/firewall_policy_data_source.go index e544fee13fcf..8be580295583 100644 --- a/internal/services/firewall/firewall_policy_data_source.go +++ b/internal/services/firewall/firewall_policy_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -30,7 +31,7 @@ func FirewallDataSourcePolicy() *pluginsdk.Resource { ValidateFunc: validate.FirewallPolicyName(), }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/hdinsight/hdinsight_cluster_data_source.go b/internal/services/hdinsight/hdinsight_cluster_data_source.go index dcfaed872a63..18633f184a0b 100644 --- a/internal/services/hdinsight/hdinsight_cluster_data_source.go +++ b/internal/services/hdinsight/hdinsight_cluster_data_source.go @@ -5,6 +5,7 @@ import ( "strings" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/hdinsight/parse" @@ -25,7 +26,7 @@ func dataSourceHDInsightSparkCluster() *pluginsdk.Resource { Schema: map[string]*pluginsdk.Schema{ "name": SchemaHDInsightDataSourceName(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/iothub/iothub_data_source.go b/internal/services/iothub/iothub_data_source.go index 0005c1a9d823..de29023333ff 100644 --- a/internal/services/iothub/iothub_data_source.go +++ b/internal/services/iothub/iothub_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/iothub/parse" iothubValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/iothub/validate" @@ -28,7 +28,7 @@ func dataSourceIotHub() *pluginsdk.Resource { Required: true, ValidateFunc: iothubValidate.IoTHubName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "hostname": { Type: pluginsdk.TypeString, diff --git a/internal/services/iothub/iothub_dps_data_source.go b/internal/services/iothub/iothub_dps_data_source.go index 8945609751c5..2b44eb0687a2 100644 --- a/internal/services/iothub/iothub_dps_data_source.go +++ b/internal/services/iothub/iothub_dps_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/iothub/parse" @@ -29,7 +30,7 @@ func dataSourceIotHubDPS() *pluginsdk.Resource { ValidateFunc: validate.IoTHubName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/iothub/iothub_dps_shared_access_policy_data_source.go b/internal/services/iothub/iothub_dps_shared_access_policy_data_source.go index 3965fc8c953b..dfb2ca244414 100644 --- a/internal/services/iothub/iothub_dps_shared_access_policy_data_source.go +++ b/internal/services/iothub/iothub_dps_shared_access_policy_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/iothub/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/iothub/validate" @@ -28,7 +28,7 @@ func dataSourceIotHubDPSSharedAccessPolicy() *pluginsdk.Resource { ValidateFunc: validate.IotHubSharedAccessPolicyName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "iothub_dps_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/iothub/iothub_shared_access_policy_data_source.go b/internal/services/iothub/iothub_shared_access_policy_data_source.go index 56161c70a95e..faa2ba4c340b 100644 --- a/internal/services/iothub/iothub_shared_access_policy_data_source.go +++ b/internal/services/iothub/iothub_shared_access_policy_data_source.go @@ -5,7 +5,7 @@ import ( "regexp" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/iothub/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/iothub/validate" @@ -31,7 +31,7 @@ func dataSourceIotHubSharedAccessPolicy() *pluginsdk.Resource { "The shared access policy key name must not be empty, and must not exceed 64 characters in length. The shared access policy key name can only contain alphanumeric characters, exclamation marks, periods, underscores and hyphens."), }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "iothub_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/keyvault/key_vault_data_source.go b/internal/services/keyvault/key_vault_data_source.go index d4c2db33a0e1..400b68346355 100644 --- a/internal/services/keyvault/key_vault_data_source.go +++ b/internal/services/keyvault/key_vault_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/preview/keyvault/mgmt/2020-04-01-preview/keyvault" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/features" @@ -33,7 +34,7 @@ func dataSourceKeyVault() *pluginsdk.Resource { ValidateFunc: validate.VaultName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/keyvault/key_vault_managed_hardware_security_module_data_source.go b/internal/services/keyvault/key_vault_managed_hardware_security_module_data_source.go index 7b510b735a5e..91cb55f4ca28 100644 --- a/internal/services/keyvault/key_vault_managed_hardware_security_module_data_source.go +++ b/internal/services/keyvault/key_vault_managed_hardware_security_module_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -30,7 +31,7 @@ func dataSourceKeyVaultManagedHardwareSecurityModule() *pluginsdk.Resource { ValidateFunc: validate.ManagedHardwareSecurityModuleName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/kusto/kusto_cluster_data_source.go b/internal/services/kusto/kusto_cluster_data_source.go index 5cab38d971f8..349df89b3823 100644 --- a/internal/services/kusto/kusto_cluster_data_source.go +++ b/internal/services/kusto/kusto_cluster_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -30,7 +31,7 @@ func dataSourceKustoCluster() *pluginsdk.Resource { ValidateFunc: validate.ClusterName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/loadbalancer/rule_data_source.go b/internal/services/loadbalancer/rule_data_source.go index dd5cbb2600e5..10c47686a1b5 100644 --- a/internal/services/loadbalancer/rule_data_source.go +++ b/internal/services/loadbalancer/rule_data_source.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/loadbalancer/parse" @@ -187,7 +187,7 @@ func dataSourceArmLoadBalancerSchema() map[string]*pluginsdk.Schema { } if !features.ThreePointOhBeta() { - out["resource_group_name"] = azure.SchemaResourceGroupNameForDataSource() + out["resource_group_name"] = commonschema.ResourceGroupNameForDataSource() } return out diff --git a/internal/services/loganalytics/log_analytics_workspace_data_source.go b/internal/services/loganalytics/log_analytics_workspace_data_source.go index adf5c6b7c95e..eccf7a7dc019 100644 --- a/internal/services/loganalytics/log_analytics_workspace_data_source.go +++ b/internal/services/loganalytics/log_analytics_workspace_data_source.go @@ -5,6 +5,7 @@ import ( "log" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/loganalytics/parse" @@ -30,7 +31,7 @@ func dataSourceLogAnalyticsWorkspace() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "sku": { Type: pluginsdk.TypeString, diff --git a/internal/services/logic/logic_app_integration_account_data_source.go b/internal/services/logic/logic_app_integration_account_data_source.go index cf009497587e..0a3b99b6b7e2 100644 --- a/internal/services/logic/logic_app_integration_account_data_source.go +++ b/internal/services/logic/logic_app_integration_account_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -28,7 +29,7 @@ func dataSourceLogicAppIntegrationAccount() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/logic/logic_app_workflow_data_source.go b/internal/services/logic/logic_app_workflow_data_source.go index 509e69f106e1..f4cac798669b 100644 --- a/internal/services/logic/logic_app_workflow_data_source.go +++ b/internal/services/logic/logic_app_workflow_data_source.go @@ -30,7 +30,7 @@ func dataSourceLogicAppWorkflow() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/machinelearning/machine_learning_workspace_data_source.go b/internal/services/machinelearning/machine_learning_workspace_data_source.go index 33e4ede2c435..bffa246f2b1b 100644 --- a/internal/services/machinelearning/machine_learning_workspace_data_source.go +++ b/internal/services/machinelearning/machine_learning_workspace_data_source.go @@ -31,7 +31,7 @@ func dataSourceMachineLearningWorkspace() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "identity": commonschema.SystemAssignedUserAssignedIdentityComputed(), diff --git a/internal/services/maintenance/maintenance_configuration_data_source.go b/internal/services/maintenance/maintenance_configuration_data_source.go index 5447b46672ce..c42b1383a454 100644 --- a/internal/services/maintenance/maintenance_configuration_data_source.go +++ b/internal/services/maintenance/maintenance_configuration_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -30,7 +31,7 @@ func dataSourceMaintenanceConfiguration() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/managedapplications/managed_application_definition_data_source.go b/internal/services/managedapplications/managed_application_definition_data_source.go index 2eabb650ad4e..0963487ab4af 100644 --- a/internal/services/managedapplications/managed_application_definition_data_source.go +++ b/internal/services/managedapplications/managed_application_definition_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -29,7 +30,7 @@ func dataSourceManagedApplicationDefinition() *pluginsdk.Resource { ValidateFunc: validate.ApplicationDefinitionName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), }, diff --git a/internal/services/mariadb/mariadb_server_data_source.go b/internal/services/mariadb/mariadb_server_data_source.go index 51bff956a23d..e5495c0d3e1e 100644 --- a/internal/services/mariadb/mariadb_server_data_source.go +++ b/internal/services/mariadb/mariadb_server_data_source.go @@ -5,6 +5,7 @@ import ( "regexp" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -36,7 +37,7 @@ func dataSourceMariaDbServer() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "sku_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/monitor/monitor_action_group_data_source.go b/internal/services/monitor/monitor_action_group_data_source.go index 8b221eb35649..778ce139b713 100644 --- a/internal/services/monitor/monitor_action_group_data_source.go +++ b/internal/services/monitor/monitor_action_group_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" eventHubValidation "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventhub/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/parse" @@ -29,7 +29,7 @@ func dataSourceMonitorActionGroup() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "short_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/monitor/monitor_scheduled_query_rules_alert_data_source.go b/internal/services/monitor/monitor_scheduled_query_rules_alert_data_source.go index a5836a3cfc99..a149d21896e3 100644 --- a/internal/services/monitor/monitor_scheduled_query_rules_alert_data_source.go +++ b/internal/services/monitor/monitor_scheduled_query_rules_alert_data_source.go @@ -6,6 +6,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2021-07-01-preview/insights" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/parse" @@ -29,7 +30,7 @@ func dataSourceMonitorScheduledQueryRulesAlert() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/monitor/monitor_scheduled_query_rules_log_data_source.go b/internal/services/monitor/monitor_scheduled_query_rules_log_data_source.go index 36e868846e23..e81ec5479b56 100644 --- a/internal/services/monitor/monitor_scheduled_query_rules_log_data_source.go +++ b/internal/services/monitor/monitor_scheduled_query_rules_log_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2021-07-01-preview/insights" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/parse" @@ -28,7 +29,7 @@ func dataSourceMonitorScheduledQueryRulesLog() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/msi/user_assigned_identity_data_source.go b/internal/services/msi/user_assigned_identity_data_source.go index 0247900dcb3d..999b7a118cee 100644 --- a/internal/services/msi/user_assigned_identity_data_source.go +++ b/internal/services/msi/user_assigned_identity_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -30,7 +31,7 @@ func dataSourceArmUserAssignedIdentity() *pluginsdk.Resource { ValidateFunc: validation.StringLenBetween(3, 128), }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/mssql/mssql_elasticpool_data_source.go b/internal/services/mssql/mssql_elasticpool_data_source.go index 144bbdb55c1b..be176ca2cfcf 100644 --- a/internal/services/mssql/mssql_elasticpool_data_source.go +++ b/internal/services/mssql/mssql_elasticpool_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" @@ -27,7 +28,7 @@ func dataSourceMsSqlElasticpool() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "server_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/mssql/mssql_managed_instance_data_source.go b/internal/services/mssql/mssql_managed_instance_data_source.go index f623501b88be..59f03fa38a13 100644 --- a/internal/services/mssql/mssql_managed_instance_data_source.go +++ b/internal/services/mssql/mssql_managed_instance_data_source.go @@ -61,7 +61,7 @@ func (d MsSqlManagedInstanceDataSource) Arguments() map[string]*pluginsdk.Schema ValidateFunc: validate.ValidateMsSqlServerName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), } } diff --git a/internal/services/mssql/mssql_server_data_source.go b/internal/services/mssql/mssql_server_data_source.go index fa1cb4067770..c156bccff5e1 100644 --- a/internal/services/mssql/mssql_server_data_source.go +++ b/internal/services/mssql/mssql_server_data_source.go @@ -31,7 +31,7 @@ func dataSourceMsSqlServer() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/mysql/mysql_flexible_server_data_source.go b/internal/services/mysql/mysql_flexible_server_data_source.go index 1935494878d2..5500d0ed305c 100644 --- a/internal/services/mysql/mysql_flexible_server_data_source.go +++ b/internal/services/mysql/mysql_flexible_server_data_source.go @@ -33,7 +33,7 @@ func dataSourceMysqlFlexibleServer() *pluginsdk.Resource { ValidateFunc: validate.FlexibleServerName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/mysql/mysql_server_data_source.go b/internal/services/mysql/mysql_server_data_source.go index 911e6257bd1a..155282129cb1 100644 --- a/internal/services/mysql/mysql_server_data_source.go +++ b/internal/services/mysql/mysql_server_data_source.go @@ -69,7 +69,7 @@ func dataSourceMySqlServer() *pluginsdk.Resource { Computed: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "restore_point_in_time": { Type: pluginsdk.TypeString, diff --git a/internal/services/netapp/netapp_account_data_source.go b/internal/services/netapp/netapp_account_data_source.go index 1873f5ac83ce..0895e93ae6f9 100644 --- a/internal/services/netapp/netapp_account_data_source.go +++ b/internal/services/netapp/netapp_account_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/parse" @@ -28,7 +29,7 @@ func dataSourceNetAppAccount() *pluginsdk.Resource { ValidateFunc: validate.AccountName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/netapp/netapp_pool_data_source.go b/internal/services/netapp/netapp_pool_data_source.go index aa3846fc4aec..7f8de1aa60a4 100644 --- a/internal/services/netapp/netapp_pool_data_source.go +++ b/internal/services/netapp/netapp_pool_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/parse" @@ -28,7 +29,7 @@ func dataSourceNetAppPool() *pluginsdk.Resource { ValidateFunc: validate.PoolName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/netapp/netapp_snapshot_data_source.go b/internal/services/netapp/netapp_snapshot_data_source.go index 044a188d49be..43e72cf35637 100644 --- a/internal/services/netapp/netapp_snapshot_data_source.go +++ b/internal/services/netapp/netapp_snapshot_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -31,7 +32,7 @@ func dataSourceNetAppSnapshot() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "account_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/netapp/netapp_volume_data_source.go b/internal/services/netapp/netapp_volume_data_source.go index 020e52629bf8..1de04b8e17ca 100644 --- a/internal/services/netapp/netapp_volume_data_source.go +++ b/internal/services/netapp/netapp_volume_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/parse" @@ -28,7 +29,7 @@ func dataSourceNetAppVolume() *pluginsdk.Resource { ValidateFunc: validate.VolumeName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/network/application_security_group_data_source.go b/internal/services/network/application_security_group_data_source.go index db5faadbc5ba..dd4940cab2e1 100644 --- a/internal/services/network/application_security_group_data_source.go +++ b/internal/services/network/application_security_group_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -30,7 +31,7 @@ func dataSourceApplicationSecurityGroup() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "tags": tags.SchemaDataSource(), }, diff --git a/internal/services/network/express_route_circuit_data_source.go b/internal/services/network/express_route_circuit_data_source.go index b565aff07537..cb17e1f10de3 100644 --- a/internal/services/network/express_route_circuit_data_source.go +++ b/internal/services/network/express_route_circuit_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-05-01/network" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -29,7 +30,7 @@ func dataSourceExpressRouteCircuit() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/network/ip_group_data_source.go b/internal/services/network/ip_group_data_source.go index 6360b039c4d2..3cb76aeb3888 100644 --- a/internal/services/network/ip_group_data_source.go +++ b/internal/services/network/ip_group_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -27,7 +28,7 @@ func dataSourceIpGroup() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/network/local_network_gateway_data_source.go b/internal/services/network/local_network_gateway_data_source.go index bd46af3de8b7..e315c063f5f4 100644 --- a/internal/services/network/local_network_gateway_data_source.go +++ b/internal/services/network/local_network_gateway_data_source.go @@ -29,7 +29,7 @@ func dataSourceLocalNetworkGateway() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": commonschema.LocationComputed(), diff --git a/internal/services/network/network_ddos_protection_plan_data_source.go b/internal/services/network/network_ddos_protection_plan_data_source.go index eb1df65919e2..0ad84df8dd5c 100644 --- a/internal/services/network/network_ddos_protection_plan_data_source.go +++ b/internal/services/network/network_ddos_protection_plan_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -29,7 +30,7 @@ func dataSourceNetworkDDoSProtectionPlan() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "virtual_network_ids": { Type: pluginsdk.TypeList, diff --git a/internal/services/network/network_interface_data_source.go b/internal/services/network/network_interface_data_source.go index 640a7a98a1a7..3ababed69246 100644 --- a/internal/services/network/network_interface_data_source.go +++ b/internal/services/network/network_interface_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -27,7 +28,7 @@ func dataSourceNetworkInterface() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": { Type: pluginsdk.TypeString, diff --git a/internal/services/network/network_security_group_data_source.go b/internal/services/network/network_security_group_data_source.go index f41e29362ad7..5853e32b29c7 100644 --- a/internal/services/network/network_security_group_data_source.go +++ b/internal/services/network/network_security_group_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -27,7 +28,7 @@ func dataSourceNetworkSecurityGroup() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/network/network_watcher_data_source.go b/internal/services/network/network_watcher_data_source.go index c1c77cb5f51c..4289de76b477 100644 --- a/internal/services/network/network_watcher_data_source.go +++ b/internal/services/network/network_watcher_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -29,7 +30,7 @@ func dataSourceNetworkWatcher() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), "tags": tags.SchemaDataSource(), }, diff --git a/internal/services/network/private_endpoint_connection_data_source.go b/internal/services/network/private_endpoint_connection_data_source.go index a45efbb07472..749db6b2a949 100644 --- a/internal/services/network/private_endpoint_connection_data_source.go +++ b/internal/services/network/private_endpoint_connection_data_source.go @@ -6,6 +6,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-05-01/network" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -31,7 +32,7 @@ func dataSourcePrivateEndpointConnection() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "network_interface": { Type: pluginsdk.TypeList, diff --git a/internal/services/network/private_link_service_data_source.go b/internal/services/network/private_link_service_data_source.go index 01e9cc2b1b97..ba0d63152e10 100644 --- a/internal/services/network/private_link_service_data_source.go +++ b/internal/services/network/private_link_service_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-05-01/network" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -32,7 +33,7 @@ func dataSourcePrivateLinkService() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "auto_approval_subscription_ids": { Type: pluginsdk.TypeList, diff --git a/internal/services/network/private_link_service_endpoint_connections_data_source.go b/internal/services/network/private_link_service_endpoint_connections_data_source.go index a70319f7a529..2c274b4f6c4b 100644 --- a/internal/services/network/private_link_service_endpoint_connections_data_source.go +++ b/internal/services/network/private_link_service_endpoint_connections_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-05-01/network" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -34,7 +35,7 @@ func dataSourcePrivateLinkServiceEndpointConnections() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "private_endpoint_connections": { Type: pluginsdk.TypeList, diff --git a/internal/services/network/public_ips_data_source.go b/internal/services/network/public_ips_data_source.go index 796692b1b37f..302a98c2c1ef 100644 --- a/internal/services/network/public_ips_data_source.go +++ b/internal/services/network/public_ips_data_source.go @@ -7,7 +7,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-05-01/network" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -23,7 +23,7 @@ func dataSourcePublicIPs() *pluginsdk.Resource { }, Schema: map[string]*pluginsdk.Schema{ - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "name_prefix": { Type: pluginsdk.TypeString, diff --git a/internal/services/network/route_filter_data_source.go b/internal/services/network/route_filter_data_source.go index faa3317c8224..d259277e8dbb 100644 --- a/internal/services/network/route_filter_data_source.go +++ b/internal/services/network/route_filter_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-05-01/network" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -30,7 +31,7 @@ func dataSourceRouteFilter() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/network/route_table_data_source.go b/internal/services/network/route_table_data_source.go index 9eb5cd57fdea..e22bcfc0dfec 100644 --- a/internal/services/network/route_table_data_source.go +++ b/internal/services/network/route_table_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-05-01/network" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -30,7 +31,7 @@ func dataSourceRouteTable() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/network/subnet_data_source.go b/internal/services/network/subnet_data_source.go index 1e11dbe3b3f7..32cbc75b1768 100644 --- a/internal/services/network/subnet_data_source.go +++ b/internal/services/network/subnet_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -34,7 +34,7 @@ func dataSourceSubnet() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "address_prefix": { Type: pluginsdk.TypeString, diff --git a/internal/services/network/virtual_hub_data_source.go b/internal/services/network/virtual_hub_data_source.go index 7b9f4c0baf8b..c04aa4093ffa 100644 --- a/internal/services/network/virtual_hub_data_source.go +++ b/internal/services/network/virtual_hub_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -29,7 +30,7 @@ func dataSourceVirtualHub() *pluginsdk.Resource { ValidateFunc: validate.VirtualHubName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/network/virtual_network_data_source.go b/internal/services/network/virtual_network_data_source.go index 0219d1a8ce4f..be45fbb6d0c9 100644 --- a/internal/services/network/virtual_network_data_source.go +++ b/internal/services/network/virtual_network_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-05-01/network" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -29,7 +30,7 @@ func dataSourceVirtualNetwork() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/network/virtual_network_gateway_connection_data_source.go b/internal/services/network/virtual_network_gateway_connection_data_source.go index a25bc5ec0393..0adaecd5fbf1 100644 --- a/internal/services/network/virtual_network_gateway_connection_data_source.go +++ b/internal/services/network/virtual_network_gateway_connection_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-05-01/network" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -30,7 +31,7 @@ func dataSourceVirtualNetworkGatewayConnection() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/network/virtual_network_gateway_data_source.go b/internal/services/network/virtual_network_gateway_data_source.go index 68b09a7d8c31..cdaa35ff2be4 100644 --- a/internal/services/network/virtual_network_gateway_data_source.go +++ b/internal/services/network/virtual_network_gateway_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-05-01/network" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -30,7 +31,7 @@ func dataSourceVirtualNetworkGateway() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/network/virtual_wan_data_source.go b/internal/services/network/virtual_wan_data_source.go index ab3569e62065..a5f5261c1e8e 100644 --- a/internal/services/network/virtual_wan_data_source.go +++ b/internal/services/network/virtual_wan_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-05-01/network" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -28,7 +29,7 @@ func dataSourceVirtualWan() *pluginsdk.Resource { Required: true, ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "allow_branch_to_branch_traffic": { Type: pluginsdk.TypeBool, diff --git a/internal/services/network/vpn_gateway_data_source.go b/internal/services/network/vpn_gateway_data_source.go index 2d8dd6682190..a3d27def0848 100644 --- a/internal/services/network/vpn_gateway_data_source.go +++ b/internal/services/network/vpn_gateway_data_source.go @@ -32,7 +32,7 @@ func dataSourceVPNGateway() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": commonschema.LocationComputed(), diff --git a/internal/services/network/web_application_firewall_policy_data_source.go b/internal/services/network/web_application_firewall_policy_data_source.go index ef228a2bd061..9ac7f2b362b3 100644 --- a/internal/services/network/web_application_firewall_policy_data_source.go +++ b/internal/services/network/web_application_firewall_policy_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" @@ -31,7 +32,7 @@ func dataWebApplicationFirewallPolicy() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "tags": tags.Schema(), }, diff --git a/internal/services/notificationhub/notification_hub_data_source.go b/internal/services/notificationhub/notification_hub_data_source.go index 1ece9bfcf1a1..ed97e49b1a06 100644 --- a/internal/services/notificationhub/notification_hub_data_source.go +++ b/internal/services/notificationhub/notification_hub_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -34,7 +35,7 @@ func dataSourceNotificationHub() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/notificationhub/notification_hub_namespace_data_source.go b/internal/services/notificationhub/notification_hub_namespace_data_source.go index 5b00cef089ea..a38a127d52a5 100644 --- a/internal/services/notificationhub/notification_hub_namespace_data_source.go +++ b/internal/services/notificationhub/notification_hub_namespace_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -29,7 +30,7 @@ func dataSourceNotificationHubNamespace() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/policy/policy_virtual_machine_configuration_assignment_data_source.go b/internal/services/policy/policy_virtual_machine_configuration_assignment_data_source.go index 58c1a361810d..be259c34b355 100644 --- a/internal/services/policy/policy_virtual_machine_configuration_assignment_data_source.go +++ b/internal/services/policy/policy_virtual_machine_configuration_assignment_data_source.go @@ -6,7 +6,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/policy/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -28,7 +28,7 @@ func dataSourcePolicyVirtualMachineConfigurationAssignment() *pluginsdk.Resource Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "virtual_machine_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/portal/portal_dashboard_data_source.go b/internal/services/portal/portal_dashboard_data_source.go index e9c33b9bff95..2d47808c0672 100644 --- a/internal/services/portal/portal_dashboard_data_source.go +++ b/internal/services/portal/portal_dashboard_data_source.go @@ -5,6 +5,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/portal/parse" @@ -29,7 +30,7 @@ func dataSourcePortalDashboard() *pluginsdk.Resource { Required: true, ValidateFunc: validate.DashboardName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), "dashboard_properties": { Type: pluginsdk.TypeString, diff --git a/internal/services/postgres/postgresql_flexible_server_data_source.go b/internal/services/postgres/postgresql_flexible_server_data_source.go index 2f6cf812792d..418944c6caba 100644 --- a/internal/services/postgres/postgresql_flexible_server_data_source.go +++ b/internal/services/postgres/postgresql_flexible_server_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -29,7 +30,7 @@ func dataSourcePostgresqlFlexibleServer() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/postgres/postgresql_server_data_source.go b/internal/services/postgres/postgresql_server_data_source.go index e805ad9f4882..684e80077672 100644 --- a/internal/services/postgres/postgresql_server_data_source.go +++ b/internal/services/postgres/postgresql_server_data_source.go @@ -28,7 +28,7 @@ func dataSourcePostgreSqlServer() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": { Type: pluginsdk.TypeString, diff --git a/internal/services/recoveryservices/backup_policy_file_share_data_source.go b/internal/services/recoveryservices/backup_policy_file_share_data_source.go index e3b77b00af93..de139676447a 100644 --- a/internal/services/recoveryservices/backup_policy_file_share_data_source.go +++ b/internal/services/recoveryservices/backup_policy_file_share_data_source.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -35,7 +35,7 @@ func dataSourceBackupPolicyFileShare() *pluginsdk.Resource { ValidateFunc: validate.RecoveryServicesVaultName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "tags": tags.SchemaDataSource(), }, diff --git a/internal/services/recoveryservices/backup_policy_vm_data_source.go b/internal/services/recoveryservices/backup_policy_vm_data_source.go index 68e72030910e..9045711b3684 100644 --- a/internal/services/recoveryservices/backup_policy_vm_data_source.go +++ b/internal/services/recoveryservices/backup_policy_vm_data_source.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -35,7 +35,7 @@ func dataSourceBackupPolicyVm() *pluginsdk.Resource { ValidateFunc: validate.RecoveryServicesVaultName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "tags": tags.SchemaDataSource(), }, diff --git a/internal/services/recoveryservices/recovery_services_vault_data_source.go b/internal/services/recoveryservices/recovery_services_vault_data_source.go index 128ce0cd0b81..1c3188dd0200 100644 --- a/internal/services/recoveryservices/recovery_services_vault_data_source.go +++ b/internal/services/recoveryservices/recovery_services_vault_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices/parse" @@ -29,7 +30,7 @@ func dataSourceRecoveryServicesVault() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "tags": tags.SchemaDataSource(), diff --git a/internal/services/recoveryservices/site_recovery_fabric_data_source.go b/internal/services/recoveryservices/site_recovery_fabric_data_source.go index 39a94685ac8d..e720ecc9a294 100644 --- a/internal/services/recoveryservices/site_recovery_fabric_data_source.go +++ b/internal/services/recoveryservices/site_recovery_fabric_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices/parse" @@ -28,7 +29,7 @@ func dataSourceSiteRecoveryFabric() *pluginsdk.Resource { Required: true, ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "recovery_vault_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/recoveryservices/site_recovery_protection_container_data_source.go b/internal/services/recoveryservices/site_recovery_protection_container_data_source.go index 0d2aa1c40d00..c22afe31e342 100644 --- a/internal/services/recoveryservices/site_recovery_protection_container_data_source.go +++ b/internal/services/recoveryservices/site_recovery_protection_container_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices/validate" @@ -28,7 +28,7 @@ func dataSourceSiteRecoveryProtectionContainer() *pluginsdk.Resource { Required: true, ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "recovery_vault_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/recoveryservices/site_recovery_replication_policy_data_source.go b/internal/services/recoveryservices/site_recovery_replication_policy_data_source.go index c60da5551d7c..554178eacdc0 100644 --- a/internal/services/recoveryservices/site_recovery_replication_policy_data_source.go +++ b/internal/services/recoveryservices/site_recovery_replication_policy_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -28,7 +28,7 @@ func dataSourceSiteRecoveryReplicationPolicy() *pluginsdk.Resource { Required: true, ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "recovery_vault_name": { Type: pluginsdk.TypeString, Required: true, diff --git a/internal/services/redisenterprise/redis_enterprise_database_data_source.go b/internal/services/redisenterprise/redis_enterprise_database_data_source.go index 76ffb1023a1d..86a75286edea 100644 --- a/internal/services/redisenterprise/redis_enterprise_database_data_source.go +++ b/internal/services/redisenterprise/redis_enterprise_database_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/redisenterprise/sdk/2021-08-01/databases" "github.com/hashicorp/terraform-provider-azurerm/internal/services/redisenterprise/sdk/2021-08-01/redisenterprise" @@ -27,7 +27,7 @@ func dataSourceRedisEnterpriseDatabase() *pluginsdk.Resource { }, // TODO: deprecate me - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "cluster_id": { Type: pluginsdk.TypeString, diff --git a/internal/services/resource/resource_group_data_source.go b/internal/services/resource/resource_group_data_source.go index a57d11690b06..30cadae0e564 100644 --- a/internal/services/resource/resource_group_data_source.go +++ b/internal/services/resource/resource_group_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -21,7 +22,7 @@ func dataSourceResourceGroup() *pluginsdk.Resource { }, Schema: map[string]*pluginsdk.Schema{ - "name": azure.SchemaResourceGroupNameForDataSource(), + "name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), "tags": tags.SchemaDataSource(), }, diff --git a/internal/services/resource/template_spec_version_data_source.go b/internal/services/resource/template_spec_version_data_source.go index 618de884bcc5..b009915ba0cc 100644 --- a/internal/services/resource/template_spec_version_data_source.go +++ b/internal/services/resource/template_spec_version_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/resource/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/resource/validate" @@ -30,7 +30,7 @@ func dataSourceTemplateSpecVersion() *pluginsdk.Resource { ValidateFunc: validate.TemplateSpecName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "version": { Type: pluginsdk.TypeString, diff --git a/internal/services/servicebus/servicebus_namespace_authorization_rule_data_source.go b/internal/services/servicebus/servicebus_namespace_authorization_rule_data_source.go index 42691cae558e..f39188348dc6 100644 --- a/internal/services/servicebus/servicebus_namespace_authorization_rule_data_source.go +++ b/internal/services/servicebus/servicebus_namespace_authorization_rule_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/servicebus/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/servicebus/validate" @@ -33,7 +33,7 @@ func dataSourceServiceBusNamespaceAuthorizationRule() *pluginsdk.Resource { ValidateFunc: validate.NamespaceName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "primary_key": { Type: pluginsdk.TypeString, diff --git a/internal/services/servicebus/servicebus_namespace_data_source.go b/internal/services/servicebus/servicebus_namespace_data_source.go index c258597a24dc..78d7af144721 100644 --- a/internal/services/servicebus/servicebus_namespace_data_source.go +++ b/internal/services/servicebus/servicebus_namespace_data_source.go @@ -5,8 +5,8 @@ import ( "log" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/servicebus/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -29,7 +29,7 @@ func dataSourceServiceBusNamespace() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": { Type: pluginsdk.TypeString, diff --git a/internal/services/servicebus/servicebus_namespace_disaster_recovery_config_data_source.go b/internal/services/servicebus/servicebus_namespace_disaster_recovery_config_data_source.go index 3f398a1c69e8..2fc94d520048 100644 --- a/internal/services/servicebus/servicebus_namespace_disaster_recovery_config_data_source.go +++ b/internal/services/servicebus/servicebus_namespace_disaster_recovery_config_data_source.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/servicebus/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -32,7 +32,7 @@ func dataSourceServiceBusNamespaceDisasterRecoveryConfig() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "partner_namespace_id": { Type: pluginsdk.TypeString, diff --git a/internal/services/servicebus/servicebus_subscription_data_source.go b/internal/services/servicebus/servicebus_subscription_data_source.go index 39ba8f6d1e06..6c8eb68fe4a2 100644 --- a/internal/services/servicebus/servicebus_subscription_data_source.go +++ b/internal/services/servicebus/servicebus_subscription_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/servicebus/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/servicebus/validate" @@ -27,7 +27,7 @@ func dataSourceServiceBusSubscription() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "namespace_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/signalr/web_pubsub_data_source.go b/internal/services/signalr/web_pubsub_data_source.go index 64af59a99b2d..66897b051438 100644 --- a/internal/services/signalr/web_pubsub_data_source.go +++ b/internal/services/signalr/web_pubsub_data_source.go @@ -6,8 +6,8 @@ import ( "strings" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/signalr/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -30,7 +30,7 @@ func dataSourceWebPubsub() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": { Type: pluginsdk.TypeString, diff --git a/internal/services/springcloud/spring_cloud_app_data_source.go b/internal/services/springcloud/spring_cloud_app_data_source.go index db1cc92ec93b..f3a5806d05e9 100644 --- a/internal/services/springcloud/spring_cloud_app_data_source.go +++ b/internal/services/springcloud/spring_cloud_app_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/springcloud/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/springcloud/validate" @@ -28,7 +28,7 @@ func dataSourceSpringCloudApp() *pluginsdk.Resource { ValidateFunc: validate.SpringCloudAppName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "service_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/springcloud/spring_cloud_service_data_source.go b/internal/services/springcloud/spring_cloud_service_data_source.go index 1addf0a5f4bb..162d89d4a480 100644 --- a/internal/services/springcloud/spring_cloud_service_data_source.go +++ b/internal/services/springcloud/spring_cloud_service_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -32,7 +33,7 @@ func dataSourceSpringCloudService() *pluginsdk.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "config_server_git_setting": { Type: pluginsdk.TypeList, diff --git a/internal/services/sql/sql_database_data_source.go b/internal/services/sql/sql_database_data_source.go index d70f807e2835..4e469be41c3d 100644 --- a/internal/services/sql/sql_database_data_source.go +++ b/internal/services/sql/sql_database_data_source.go @@ -5,8 +5,8 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -34,7 +34,7 @@ func dataSourceSqlDatabase() *pluginsdk.Resource { Computed: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "server_name": { Type: pluginsdk.TypeString, diff --git a/internal/services/sql/sql_managed_instance_data_source.go b/internal/services/sql/sql_managed_instance_data_source.go index e84887a52bcc..8df049400276 100644 --- a/internal/services/sql/sql_managed_instance_data_source.go +++ b/internal/services/sql/sql_managed_instance_data_source.go @@ -33,7 +33,7 @@ func dataSourceArmSqlMiServer() *schema.Resource { "location": azure.SchemaLocationForDataSource(), - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "sku_name": { Type: schema.TypeString, diff --git a/internal/services/sql/sql_server_data_source.go b/internal/services/sql/sql_server_data_source.go index 79d3673cb651..facf9d4b6026 100644 --- a/internal/services/sql/sql_server_data_source.go +++ b/internal/services/sql/sql_server_data_source.go @@ -5,9 +5,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -30,7 +28,7 @@ func dataSourceSqlServer() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": { Type: pluginsdk.TypeString, diff --git a/internal/services/storage/storage_account_data_source.go b/internal/services/storage/storage_account_data_source.go index 4c1c90e9a4d1..149c06f2a6b0 100644 --- a/internal/services/storage/storage_account_data_source.go +++ b/internal/services/storage/storage_account_data_source.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" azautorest "github.com/Azure/go-autorest/autorest" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/parse" @@ -33,7 +34,7 @@ func dataSourceStorageAccount() *pluginsdk.Resource { ValidateFunc: validate.StorageAccountName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/storage/storage_sync_data_source.go b/internal/services/storage/storage_sync_data_source.go index 5e3e4685ca23..d342028ecebf 100644 --- a/internal/services/storage/storage_sync_data_source.go +++ b/internal/services/storage/storage_sync_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -30,7 +31,7 @@ func dataSourceStorageSync() *pluginsdk.Resource { ValidateFunc: validate.StorageSyncName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/streamanalytics/stream_analytics_job_data_source.go b/internal/services/streamanalytics/stream_analytics_job_data_source.go index a58da576cb38..cd2df22022ca 100644 --- a/internal/services/streamanalytics/stream_analytics_job_data_source.go +++ b/internal/services/streamanalytics/stream_analytics_job_data_source.go @@ -28,7 +28,7 @@ func dataSourceStreamAnalyticsJob() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/synapse/synapse_workspace_data_source.go b/internal/services/synapse/synapse_workspace_data_source.go index d2691863cd4e..a121fd8aa6f6 100644 --- a/internal/services/synapse/synapse_workspace_data_source.go +++ b/internal/services/synapse/synapse_workspace_data_source.go @@ -31,7 +31,7 @@ func dataSourceSynapseWorkspace() *pluginsdk.Resource { ValidateFunc: validate.WorkspaceName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/trafficmanager/traffic_manager_profile_data_source.go b/internal/services/trafficmanager/traffic_manager_profile_data_source.go index 8555d1e0013b..09187cfa0bff 100644 --- a/internal/services/trafficmanager/traffic_manager_profile_data_source.go +++ b/internal/services/trafficmanager/traffic_manager_profile_data_source.go @@ -7,7 +7,6 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/trafficmanager/sdk/2018-08-01/profiles" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -30,7 +29,7 @@ func dataSourceArmTrafficManagerProfile() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "profile_status": { Type: pluginsdk.TypeString, diff --git a/internal/services/web/app_service_certificate_data_source.go b/internal/services/web/app_service_certificate_data_source.go index 3c68bb3a95e0..292591a9a2c9 100644 --- a/internal/services/web/app_service_certificate_data_source.go +++ b/internal/services/web/app_service_certificate_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/web/parse" @@ -29,7 +30,7 @@ func dataSourceAppServiceCertificate() *pluginsdk.Resource { ValidateFunc: validation.StringIsNotEmpty, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/web/app_service_certificate_order_data_source.go b/internal/services/web/app_service_certificate_order_data_source.go index 82af9bdd6678..f2c2ff4759eb 100644 --- a/internal/services/web/app_service_certificate_order_data_source.go +++ b/internal/services/web/app_service_certificate_order_data_source.go @@ -5,6 +5,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-02-01/web" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/web/parse" @@ -28,7 +29,7 @@ func dataSourceAppServiceCertificateOrder() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/web/app_service_data_source.go b/internal/services/web/app_service_data_source.go index 293915f2d975..cbf6dab23c14 100644 --- a/internal/services/web/app_service_data_source.go +++ b/internal/services/web/app_service_data_source.go @@ -5,6 +5,7 @@ import ( "strings" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/web/parse" @@ -28,7 +29,7 @@ func dataSourceAppService() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/web/app_service_environment_data_source.go b/internal/services/web/app_service_environment_data_source.go index e1d5ee792e45..da2d5d3e1eb1 100644 --- a/internal/services/web/app_service_environment_data_source.go +++ b/internal/services/web/app_service_environment_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -28,7 +29,7 @@ func dataSourceAppServiceEnvironment() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/web/app_service_environment_v3_data_source.go b/internal/services/web/app_service_environment_v3_data_source.go index c87e2e4da677..21de99b8be9a 100644 --- a/internal/services/web/app_service_environment_v3_data_source.go +++ b/internal/services/web/app_service_environment_v3_data_source.go @@ -5,8 +5,8 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/web/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/web/validate" @@ -27,7 +27,7 @@ func (r AppServiceEnvironmentV3DataSource) Arguments() map[string]*pluginsdk.Sch ValidateFunc: validate.AppServiceEnvironmentName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), } } diff --git a/internal/services/web/app_service_plan_data_source.go b/internal/services/web/app_service_plan_data_source.go index a8a83398391f..e691f82fb739 100644 --- a/internal/services/web/app_service_plan_data_source.go +++ b/internal/services/web/app_service_plan_data_source.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/web/parse" @@ -27,7 +28,7 @@ func dataSourceAppServicePlan() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/web/function_app_data_source.go b/internal/services/web/function_app_data_source.go index 3ea1be5ad291..795d1d4c1c93 100644 --- a/internal/services/web/function_app_data_source.go +++ b/internal/services/web/function_app_data_source.go @@ -33,7 +33,7 @@ func dataSourceFunctionApp() *pluginsdk.Resource { ValidateFunc: webValidate.AppServiceName, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "location": azure.SchemaLocationForDataSource(), diff --git a/internal/services/web/function_app_host_keys_data_source.go b/internal/services/web/function_app_host_keys_data_source.go index aee7cbe8d3f9..ee2cc89efe50 100644 --- a/internal/services/web/function_app_host_keys_data_source.go +++ b/internal/services/web/function_app_host_keys_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/web/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -26,7 +26,7 @@ func dataSourceFunctionAppHostKeys() *pluginsdk.Resource { Required: true, }, - "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), "master_key": { Type: pluginsdk.TypeString,