add validation for cookie stickiness
This commit is contained in:
parent
b81f9a9c52
commit
e94fcdb9df
|
@ -42,6 +42,14 @@ func resourceAwsLBCookieStickinessPolicy() *schema.Resource {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
ForceNew: 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
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue