diff --git a/builtin/providers/aws/resource_aws_redshift_cluster.go b/builtin/providers/aws/resource_aws_redshift_cluster.go index af6eda093b..3273b639b8 100644 --- a/builtin/providers/aws/resource_aws_redshift_cluster.go +++ b/builtin/providers/aws/resource_aws_redshift_cluster.go @@ -750,9 +750,9 @@ func validateRedshiftClusterIdentifier(v interface{}, k string) (ws []string, er func validateRedshiftClusterDbName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) - if !regexp.MustCompile(`^[a-z]+$`).MatchString(value) { + if !regexp.MustCompile(`^[0-9a-z]+$`).MatchString(value) { errors = append(errors, fmt.Errorf( - "only lowercase letters characters allowed in %q", k)) + "only lowercase letters and numeric characters allowed in %q", k)) } if len(value) > 64 { errors = append(errors, fmt.Errorf( diff --git a/builtin/providers/aws/resource_aws_redshift_cluster_test.go b/builtin/providers/aws/resource_aws_redshift_cluster_test.go index 4be682136b..903278c88a 100644 --- a/builtin/providers/aws/resource_aws_redshift_cluster_test.go +++ b/builtin/providers/aws/resource_aws_redshift_cluster_test.go @@ -319,7 +319,7 @@ func TestResourceAWSRedshiftClusterDbNameValidation(t *testing.T) { }, { Value: "testing1", - ErrCount: 1, + ErrCount: 0, }, { Value: "testing-",