digitalocean_loadbalancer - Adds 'https' to healthcheck protocols; (#460)

This commit is contained in:
George Cox 2020-07-14 15:57:41 -04:00 committed by GitHub
parent a2481529a5
commit 289c96e90b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -117,6 +117,7 @@ func resourceDigitalOceanLoadbalancer() *schema.Resource {
Required: true,
ValidateFunc: validation.StringInSlice([]string{
"http",
"https",
"tcp",
}, false),
},
@ -250,6 +251,10 @@ func resourceDigitalOceanLoadbalancer() *schema.Resource {
if !hasPath {
return fmt.Errorf("health check `path` is required for when protocol is `http`")
}
} else if healthCheckProtocol == "https" {
if !hasPath {
return fmt.Errorf("health check `path` is required for when protocol is `https`")
}
} else {
if hasPath {
return fmt.Errorf("health check `path` is not allowed for when protocol is `tcp`")

View File

@ -133,7 +133,7 @@ the backend service. Default value is `false`.
`healthcheck` supports the following:
* `protocol` - (Required) The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`.
* `protocol` - (Required) The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`.
* `port` - (Optional) An integer representing the port on the backend Droplets on which the health check will attempt a connection.
* `path` - (Optional) The path on the backend Droplets to which the Load Balancer instance will send a request.
* `check_interval_seconds` - (Optional) The number of seconds between between two consecutive health checks. If not specified, the default value is `10`.