Skip to content

Commit 7f46b07

Browse files
authored
Updated storage share directory name regex to allow underscore (#12454)
* updated storage share directory name regex to allow underscore * updated storage share directory name regex to allow underscore
1 parent 1c2a8ff commit 7f46b07

File tree

1 file changed

+2
-2
lines changed
  • azurerm/internal/services/storage/validate

1 file changed

+2
-2
lines changed

azurerm/internal/services/storage/validate/storage.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
func StorageShareDirectoryName(v interface{}, k string) (warnings []string, errors []error) {
99
value := v.(string)
1010

11-
if !regexp.MustCompile(`^[A-Za-z0-9-]+(/[A-Za-z0-9-]+)*$`).MatchString(value) {
12-
errors = append(errors, fmt.Errorf("%s must contain only uppercase and lowercase alphanumeric characters, numbers and hyphens, and can be nested multiple levels", k))
11+
if !regexp.MustCompile(`^[A-Za-z0-9\-_]+(/[A-Za-z0-9\-_]+)*$`).MatchString(value) {
12+
errors = append(errors, fmt.Errorf("%s must contain only uppercase and lowercase alphanumeric characters, numbers, hyphens and underscores, and can be nested multiple levels", k))
1313
}
1414

1515
return warnings, errors

0 commit comments

Comments
 (0)