Merge pull request #2580 from pmoust/b-aws-elb-A-Z

providers/aws: aws_elb: Allow alnum plus hyphen in name attribute
This commit is contained in:
Radek Simko 2015-07-01 07:28:16 +01:00
commit 815c900aae
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(