Merge pull request #2604 from CpuID/cpuid_gh2603

Allow underscores in aws_db_subnet_group name
This commit is contained in:
Radek Simko 2015-07-02 23:57:49 +02:00
commit 127fa3090f
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(