diff --git a/.changelog/33704.txt b/.changelog/33704.txt new file mode 100644 index 00000000000..37d05782fbc --- /dev/null +++ b/.changelog/33704.txt @@ -0,0 +1,6 @@ +```release-note:bug +resource/aws_db_parameter_group: Group names containing periods (`.`) no longer fail validation +``` +```release-note:bug +resource/aws_rds_cluster_parameter_group: Group names containing periods (`.`) no longer fail validation +``` diff --git a/internal/service/rds/validate.go b/internal/service/rds/validate.go index 6a627922034..1647dc456f3 100644 --- a/internal/service/rds/validate.go +++ b/internal/service/rds/validate.go @@ -70,9 +70,9 @@ func validOptionGroupNamePrefix(v interface{}, k string) (ws []string, errors [] func validParamGroupName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) - if !regexache.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + if !regexache.MustCompile(`^[0-9a-z.-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in parameter group %q", k)) + "only lowercase alphanumeric characters, periods, and hyphens allowed in parameter group %q", k)) } if !regexache.MustCompile(`^[a-z]`).MatchString(value) { errors = append(errors, fmt.Errorf( diff --git a/internal/service/rds/validate_test.go b/internal/service/rds/validate_test.go index 49c9554c39c..c02eee2c064 100644 --- a/internal/service/rds/validate_test.go +++ b/internal/service/rds/validate_test.go @@ -124,6 +124,10 @@ func TestValidParamGroupName(t *testing.T) { Value string ErrCount int }{ + { + Value: "default.postgres9.6", + ErrCount: 0, + }, { Value: "tEsting123", ErrCount: 1,