diff --git a/builtin/providers/aws/resource_aws_elasticache_replication_group.go b/builtin/providers/aws/resource_aws_elasticache_replication_group.go index 4239863df1..588d0c6abe 100644 --- a/builtin/providers/aws/resource_aws_elasticache_replication_group.go +++ b/builtin/providers/aws/resource_aws_elasticache_replication_group.go @@ -404,9 +404,9 @@ func validateAwsElastiCacheReplicationGroupEngine(v interface{}, k string) (ws [ func validateAwsElastiCacheReplicationGroupId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) - if (len(value) < 1) || (len(value) > 20) { + if (len(value) < 1) || (len(value) > 16) { errors = append(errors, fmt.Errorf( - "%q must contain from 1 to 20 alphanumeric characters or hyphens", k)) + "%q must contain from 1 to 16 alphanumeric characters or hyphens", k)) } if !regexp.MustCompile(`^[0-9a-zA-Z-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf( diff --git a/builtin/providers/aws/resource_aws_elasticache_replication_group_test.go b/builtin/providers/aws/resource_aws_elasticache_replication_group_test.go index 3188eebc4c..ebd3e6a9e3 100644 --- a/builtin/providers/aws/resource_aws_elasticache_replication_group_test.go +++ b/builtin/providers/aws/resource_aws_elasticache_replication_group_test.go @@ -164,7 +164,7 @@ func TestResourceAWSElastiCacheReplicationGroupIdValidation(t *testing.T) { ErrCount: 1, }, { - Value: randomString(65), + Value: randomString(17), ErrCount: 1, }, }