Skip to content

Commit

Permalink
Whoops! Just use the regular expression in Azure's docs.
Browse files Browse the repository at this point in the history
I missed that on the first eye-over.
  • Loading branch information
mjgpy3 committed Jul 3, 2017
1 parent d01b8e5 commit fc8a180
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azurerm/resource_arm_storage_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ func resourceArmStorageAccountDelete(d *schema.ResourceData, meta interface{}) e
func validateArmStorageAccountName(v interface{}, k string) (ws []string, es []error) {
input := v.(string)

if !regexp.MustCompile(`\A([a-z0-9]{3,24})\z`).MatchString(input) {
es = append(es, fmt.Errorf("name can only consist of lowercase letters and numbers, and must be between 3 and 24 characters long"))
if !regexp.MustCompile(`\A([A-Za-z][A-Za-z0-9]{2,62})\z`).MatchString(input) {
es = append(es, fmt.Errorf("name can only consist of lowercase letters and numbers, must be between 3 and 24 characters long and must begin with a letter"))
}

return
Expand Down

0 comments on commit fc8a180

Please sign in to comment.