aws: Fix validation for aws_db_instance.identifier
This commit is contained in:
parent
bfcd936f3a
commit
2a9293a036
|
@ -76,7 +76,7 @@ func resourceAwsDbInstance() *schema.Resource {
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
|
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
|
||||||
value := v.(string)
|
value := v.(string)
|
||||||
if !regexp.MustCompile(`^[0-9a-z-]$`).MatchString(value) {
|
if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) {
|
||||||
errors = append(errors, fmt.Errorf(
|
errors = append(errors, fmt.Errorf(
|
||||||
"only lowercase alphanumeric characters and hyphens allowed in %q", k))
|
"only lowercase alphanumeric characters and hyphens allowed in %q", k))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue