Skip to content

Commit

Permalink
Health Check Logging (#3346) (#6058)
Browse files Browse the repository at this point in the history
* hc-logging

* update health checking example to be beta only

* RegionHealthCheck Logging test

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Apr 6, 2020
1 parent 6276e17 commit 70d60f1
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/3346.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
compute: Added field `log_config` to `google_compute_health_check` and `google_compute_region_health_check` to enable health check logging.
```
26 changes: 26 additions & 0 deletions website/docs/r/compute_health_check.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,32 @@ resource "google_compute_health_check" "http2-health-check" {
}
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=health_check_with_logging&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Health Check With Logging


```hcl
resource "google_compute_health_check" "health-check-with-logging" {
provider = google-beta
name = "tcp-health-check"
timeout_sec = 1
check_interval_sec = 1
tcp_health_check {
port = "22"
}
log_config {
enable = true
}
}
```

## Argument Reference

Expand Down
26 changes: 26 additions & 0 deletions website/docs/r/compute_region_health_check.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,32 @@ resource "google_compute_region_health_check" "http-region-health-check" {
}
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=region_health_check_http_logs&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Region Health Check Http Logs


```hcl
resource "google_compute_region_health_check" "http-region-health-check" {
provider = google-beta
name = "http-region-health-check"
timeout_sec = 1
check_interval_sec = 1
http_health_check {
port = "80"
}
log_config {
enable = true
}
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=region_health_check_http_full&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
Expand Down

0 comments on commit 70d60f1

Please sign in to comment.