mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
provider/aws: allow numeric characters in RedshiftClusterDbName (#8178)
This commit is contained in:
parent
b1a778ee23
commit
bd22a4f65a
@ -750,9 +750,9 @@ func validateRedshiftClusterIdentifier(v interface{}, k string) (ws []string, er
|
|||||||
|
|
||||||
func validateRedshiftClusterDbName(v interface{}, k string) (ws []string, errors []error) {
|
func validateRedshiftClusterDbName(v interface{}, k string) (ws []string, errors []error) {
|
||||||
value := v.(string)
|
value := v.(string)
|
||||||
if !regexp.MustCompile(`^[a-z]+$`).MatchString(value) {
|
if !regexp.MustCompile(`^[0-9a-z]+$`).MatchString(value) {
|
||||||
errors = append(errors, fmt.Errorf(
|
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 {
|
if len(value) > 64 {
|
||||||
errors = append(errors, fmt.Errorf(
|
errors = append(errors, fmt.Errorf(
|
||||||
|
@ -319,7 +319,7 @@ func TestResourceAWSRedshiftClusterDbNameValidation(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Value: "testing1",
|
Value: "testing1",
|
||||||
ErrCount: 1,
|
ErrCount: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Value: "testing-",
|
Value: "testing-",
|
||||||
|
Loading…
Reference in New Issue
Block a user