diff --git a/builtin/providers/aws/resource_aws_elb.go b/builtin/providers/aws/resource_aws_elb.go index c69d1b16f..a57fc840a 100644 --- a/builtin/providers/aws/resource_aws_elb.go +++ b/builtin/providers/aws/resource_aws_elb.go @@ -32,19 +32,20 @@ func resourceAwsElb() *schema.Resource { value := v.(string) if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) + "only alphanumeric characters and hyphens allowed in %q: %q", + k, value)) } if len(value) > 32 { errors = append(errors, fmt.Errorf( - "%q cannot be longer than 32 characters", k)) + "%q cannot be longer than 32 characters: %q", k, value)) } if regexp.MustCompile(`^-`).MatchString(value) { errors = append(errors, fmt.Errorf( - "%q cannot begin with a hyphen", k)) + "%q cannot begin with a hyphen: %q", k, value)) } if regexp.MustCompile(`-$`).MatchString(value) { errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) + "%q cannot end with a hyphen: %q", k, value)) } return },