Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
sinbai committed Apr 19, 2023
1 parent 7943ca2 commit a8c25e8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions internal/services/storagemover/storage_mover_project_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package storagemover
import (
"context"
"fmt"
"regexp"
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"
Expand Down Expand Up @@ -38,10 +39,13 @@ func (r StorageMoverProjectResource) IDValidationFunc() pluginsdk.SchemaValidate
func (r StorageMoverProjectResource) Arguments() map[string]*pluginsdk.Schema {
return map[string]*pluginsdk.Schema{
"name": {
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.StringIsNotEmpty,
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.StringMatch(
regexp.MustCompile(`^[0-9a-zA-Z][-_0-9a-zA-Z]{0,63}$`),
`The name must be between 1 and 64 characters in length, begin with a letter or number, and may contain letters, numbers, dashes and underscore.`,
),
},

"storage_mover_id": {
Expand Down

0 comments on commit a8c25e8

Please sign in to comment.