Redshift master usernames may contain underscores
This commit is contained in:
parent
c6b768eaa5
commit
1c5c58d072
|
@ -579,7 +579,7 @@ func validateRedshiftClusterFinalSnapshotIdentifier(v interface{}, k string) (ws
|
||||||
|
|
||||||
func validateRedshiftClusterMasterUsername(v interface{}, k string) (ws []string, errors []error) {
|
func validateRedshiftClusterMasterUsername(v interface{}, k string) (ws []string, errors []error) {
|
||||||
value := v.(string)
|
value := v.(string)
|
||||||
if !regexp.MustCompile(`^[A-Za-z0-9]+$`).MatchString(value) {
|
if !regexp.MustCompile(`^\w+$`).MatchString(value) {
|
||||||
errors = append(errors, fmt.Errorf(
|
errors = append(errors, fmt.Errorf(
|
||||||
"only alphanumeric characters in %q", k))
|
"only alphanumeric characters in %q", k))
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,6 +257,10 @@ func TestResourceAWSRedshiftClusterMasterUsernameValidation(t *testing.T) {
|
||||||
Value: randomString(129),
|
Value: randomString(129),
|
||||||
ErrCount: 1,
|
ErrCount: 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Value: "testing_testing123",
|
||||||
|
ErrCount: 0,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range cases {
|
for _, tc := range cases {
|
||||||
|
|
Loading…
Reference in New Issue