providers/aws: aws_elb: Allow alnum plus hyphen in name attribute

This commit is contained in:
Panagiotis Moustafellos 2015-07-01 02:18:58 +03:00
parent 3d81d83d01
commit 0cbb815d28
1 changed files with 2 additions and 2 deletions

View File

@ -28,9 +28,9 @@ func resourceAwsElb() *schema.Resource {
ForceNew: true,
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
value := v.(string)
if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) {
if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) {
errors = append(errors, fmt.Errorf(
"only lowercase alphanumeric characters and hyphens allowed in %q", k))
"only alphanumeric characters and hyphens allowed in %q", k))
}
if len(value) > 32 {
errors = append(errors, fmt.Errorf(