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:
commit
815c900aae
|
@ -28,9 +28,9 @@ func resourceAwsElb() *schema.Resource {
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
|
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
|
||||||
value := v.(string)
|
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(
|
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 {
|
if len(value) > 32 {
|
||||||
errors = append(errors, fmt.Errorf(
|
errors = append(errors, fmt.Errorf(
|
||||||
|
|
Loading…
Reference in New Issue