Merge pull request #2522 from TimeIncOSS/fix-db-instance-validation

aws: Fix validation for aws_db_instance.identifier
This commit is contained in:
Radek Simko 2015-06-26 18:25:22 +01:00
commit 5ad9ba0e42
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ func resourceAwsDbInstance() *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-z-]+$`).MatchString(value) {
errors = append(errors, fmt.Errorf(
"only lowercase alphanumeric characters and hyphens allowed in %q", k))
}