Skip to content

Commit

Permalink
add validation for cookie stickiness
Browse files Browse the repository at this point in the history
  • Loading branch information
catsby committed Nov 13, 2015
1 parent b81f9a9 commit e94fcdb
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ func resourceAwsLBCookieStickinessPolicy() *schema.Resource {
Type: schema.TypeInt,
Optional: true,
ForceNew: true,
ValidateFunc: func(v interface{}, k string) (ws []string, es []error) {
value := v.(int)
if value <= 0 {
es = append(es, fmt.Errorf(
"LB Cookie Expiration Period must be greater than zero if specified"))
}
return
},
},
},
}
Expand Down

0 comments on commit e94fcdb

Please sign in to comment.