Validate that bastion IdleTimeout < 1 hour

Fix #1198
This commit is contained in:
Justin Santa Barbara 2017-01-17 01:32:19 -05:00
parent 17afbd6292
commit 3c7e19ecae
1 changed files with 4 additions and 0 deletions

View File

@ -326,6 +326,10 @@ func (c *Cluster) Validate(strict bool) error {
if bastion.IdleTimeoutSeconds != nil && *bastion.IdleTimeoutSeconds <= 0 {
return fmt.Errorf("Bastion IdleTimeoutSeconds should be greater than zero")
}
if bastion.IdleTimeoutSeconds != nil && *bastion.IdleTimeoutSeconds > 3600 {
return fmt.Errorf("Bastion IdleTimeoutSeconds cannot be greater than one hour")
}
}
}