Skip to content

Commit

Permalink
#25238 azurerm_data_share should allow "-" in the name (#25242)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnyry authored Mar 15, 2024
1 parent e151398 commit cb96989
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/services/datashare/validate/share_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ import (

func ShareName() pluginsdk.SchemaValidateFunc {
return validation.StringMatch(
regexp.MustCompile(`^\w{2,90}$`), `DataShare name can only contain alphanumeric characters and _, and must be between 2 and 90 characters long.`,
regexp.MustCompile(`^[\w-]{2,90}$`), `DataShare name can only contain numbers, letters, - and _, and must be between 2 and 90 characters long.`,
)
}
6 changes: 3 additions & 3 deletions internal/services/datashare/validate/share_name_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ func TestShareName(t *testing.T) {
valid: false,
},
{
name: "invalid character2",
name: "valid",
input: "adgeFG-98",
valid: false,
valid: true,
},
{
name: "valid",
name: "valid 2",
input: "dfakF88u7_",
valid: true,
},
Expand Down

0 comments on commit cb96989

Please sign in to comment.