From 2a9293a036af3a9957b02c6a45a126c17ec6ea99 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Fri, 26 Jun 2015 17:57:13 +0100 Subject: [PATCH] aws: Fix validation for aws_db_instance.identifier --- builtin/providers/aws/resource_aws_db_instance.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_db_instance.go b/builtin/providers/aws/resource_aws_db_instance.go index 008137afa..53b6a6987 100644 --- a/builtin/providers/aws/resource_aws_db_instance.go +++ b/builtin/providers/aws/resource_aws_db_instance.go @@ -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)) }