diff --git a/builtin/providers/aws/resource_aws_db_subnet_group.go b/builtin/providers/aws/resource_aws_db_subnet_group.go index 6da15eb18..4b410a515 100644 --- a/builtin/providers/aws/resource_aws_db_subnet_group.go +++ b/builtin/providers/aws/resource_aws_db_subnet_group.go @@ -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(