diff --git a/azurerm/internal/services/containers/container_registry_scope_map_data_source.go b/azurerm/internal/services/containers/container_registry_scope_map_data_source.go index b49bec4cb345..bbca746ce54f 100644 --- a/azurerm/internal/services/containers/container_registry_scope_map_data_source.go +++ b/azurerm/internal/services/containers/container_registry_scope_map_data_source.go @@ -7,6 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/containers/validate" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" ) @@ -27,7 +28,7 @@ func dataSourceContainerRegistryScopeMap() *schema.Resource { "container_registry_name": { Type: schema.TypeString, Required: true, - ValidateFunc: ValidateContainerRegistryName, + ValidateFunc: validate.ContainerRegistryName, }, "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), "description": { diff --git a/azurerm/internal/services/containers/container_registry_scope_map_resource.go b/azurerm/internal/services/containers/container_registry_scope_map_resource.go index dbaeb42cab9c..3de73d874b13 100644 --- a/azurerm/internal/services/containers/container_registry_scope_map_resource.go +++ b/azurerm/internal/services/containers/container_registry_scope_map_resource.go @@ -13,6 +13,7 @@ import ( "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/containers/parse" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/containers/validate" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" ) @@ -39,7 +40,7 @@ func resourceContainerRegistryScopeMap() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: ValidateContainerRegistryName, + ValidateFunc: validate.ContainerRegistryName, }, "description": { @@ -54,7 +55,7 @@ func resourceContainerRegistryScopeMap() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: ValidateContainerRegistryName, + ValidateFunc: validate.ContainerRegistryName, }, "actions": { diff --git a/azurerm/internal/services/containers/container_registry_token_data_source.go b/azurerm/internal/services/containers/container_registry_token_data_source.go index c040c4ed5b4d..dd6260d2488c 100644 --- a/azurerm/internal/services/containers/container_registry_token_data_source.go +++ b/azurerm/internal/services/containers/container_registry_token_data_source.go @@ -8,6 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/containers/validate" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" ) @@ -24,13 +25,13 @@ func dataSourceContainerRegistryToken() *schema.Resource { "name": { Type: schema.TypeString, Required: true, - ValidateFunc: ValidateContainerRegistryName, + ValidateFunc: validate.ContainerRegistryName, }, "container_registry_name": { Type: schema.TypeString, Required: true, - ValidateFunc: ValidateContainerRegistryName, + ValidateFunc: validate.ContainerRegistryName, }, "resource_group_name": azure.SchemaResourceGroupNameForDataSource(), diff --git a/azurerm/internal/services/containers/container_registry_token_resource.go b/azurerm/internal/services/containers/container_registry_token_resource.go index 1fb09db5840f..1813f10411f6 100644 --- a/azurerm/internal/services/containers/container_registry_token_resource.go +++ b/azurerm/internal/services/containers/container_registry_token_resource.go @@ -39,7 +39,7 @@ func resourceContainerRegistryToken() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: ValidateContainerRegistryName, + ValidateFunc: validate.ContainerRegistryName, }, "resource_group_name": azure.SchemaResourceGroupName(), @@ -48,7 +48,7 @@ func resourceContainerRegistryToken() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: ValidateContainerRegistryName, + ValidateFunc: validate.ContainerRegistryName, }, "scope_map_id": {