allow underscores in aws_db_subnet_group name, docs don't claim they are

allowed but they are.
This commit is contained in:
Nathan Sullivan 2015-07-02 14:45:25 +10:00
parent e26a1b8c18
commit c0b692b360
1 changed files with 2 additions and 2 deletions

View File

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