provider/aws: fix db_subnet acc test
AWS accepts uppercase DB Subnet Group names - it just automatically downcases them. We already had logic to handle that - so we intentionally had an acctest with uppercase characters that was now failing. Loosening the regexp to allow uppercase letters for now - we can discuss if we want to tighten the validation as a separate question. /cc @radeksimko @catsby
This commit is contained in:
parent
57980349fc
commit
8fa96d2c33
|
@ -27,9 +27,9 @@ func resourceAwsDbSubnetGroup() *schema.Resource {
|
||||||
Required: true,
|
Required: 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-Za-z-]+$`).MatchString(value) {
|
||||||
errors = append(errors, fmt.Errorf(
|
errors = append(errors, fmt.Errorf(
|
||||||
"only lowercase alphanumeric characters and hyphens allowed in %q", k))
|
"only alphanumeric characters and hyphens allowed in %q", k))
|
||||||
}
|
}
|
||||||
if len(value) > 255 {
|
if len(value) > 255 {
|
||||||
errors = append(errors, fmt.Errorf(
|
errors = append(errors, fmt.Errorf(
|
||||||
|
|
Loading…
Reference in New Issue