provider/aws: allow numeric characters in RedshiftClusterDbName (#8178)

This commit is contained in:
Alexander Zhukau 2016-08-14 16:57:44 -04:00 committed by Paul Stack
parent b1a778ee23
commit bd22a4f65a
2 changed files with 3 additions and 3 deletions

View File

@ -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(

View File

@ -319,7 +319,7 @@ func TestResourceAWSRedshiftClusterDbNameValidation(t *testing.T) {
},
{
Value: "testing1",
ErrCount: 1,
ErrCount: 0,
},
{
Value: "testing-",