Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added missing option to set port on health_check #1078

Merged
merged 3 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added missing test and docs
  • Loading branch information
nemcikjan committed Nov 14, 2023
commit a55493642820fd7d75279315c2c35762bf0ecc5d
3 changes: 3 additions & 0 deletions digitalocean/app/resource_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ func TestAccDigitalOceanApp_Basic(t *testing.T) {
"digitalocean_app.foobar", "spec.0.service.0.health_check.0.http_path", "/"),
resource.TestCheckResourceAttr(
"digitalocean_app.foobar", "spec.0.service.0.health_check.0.timeout_seconds", "10"),
resource.TestCheckResourceAttr(
"digitalocean_app.foobar", "spec.0.service.0.health_check.0.port", "1234"),
resource.TestCheckResourceAttr(
"digitalocean_app.foobar", "spec.0.service.0.alert.0.value", "75"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -898,6 +900,7 @@ resource "digitalocean_app" "foobar" {
health_check {
http_path = "/"
timeout_seconds = 10
port = 1234
}

alert {
Expand Down
1 change: 1 addition & 0 deletions docs/resources/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ A `service` can contain:
- `timeout_seconds` - The number of seconds after which the check times out.
- `success_threshold` - The number of successful health checks before considered healthy.
- `failure_threshold` - The number of failed health checks before considered unhealthy.
- `port` - The health check will be performed on this port instead of component's HTTP port.
* `cors` - (Deprecated - use `ingress`) The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
* `alert` - Describes an alert policy for the component.
- `rule` - The type of the alert to configure. Component app alert policies can be: `CPU_UTILIZATION`, `MEM_UTILIZATION`, or `RESTART_COUNT`.
Expand Down
Loading