provider-aws: validate cluster_id length for aws_elasticache_cluster (#6330)

pull/6332/head
lian 10 years ago committed by Paul Stack
parent 7a4bf6ae47
commit a443144c89

@ -33,6 +33,14 @@ func resourceAwsElasticacheCluster() *schema.Resource {
// with non-converging diffs.
return strings.ToLower(val.(string))
},
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
value := v.(string)
if (len(value) < 1) || (len(value) > 20) {
errors = append(errors, fmt.Errorf(
"%q must contain from 1 to 20 alphanumeric characters or hyphens", k))
}
return
},
},
"configuration_endpoint": &schema.Schema{
Type: schema.TypeString,

Loading…
Cancel
Save