Skip to content

Commit

Permalink
Merge pull request #159 from nosportugal/healthz
Browse files Browse the repository at this point in the history
feat: add option to expose /healthz without IAP
  • Loading branch information
d-costa committed Aug 1, 2024
2 parents ec963dd + 2eee881 commit 9b85ba1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
directory: .
quiet: true
skip_check: CKV_TF_1,CKV_GCP_32,CKV_GCP_34,CKV2_GCP_18
skip_check: CKV_TF_1,CKV_TF_2,CKV_GCP_32,CKV_GCP_34,CKV2_GCP_18
framework: terraform

# Terraform-docs
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ You can check the status of the certificate in the Google Cloud Console.
| <a name="input_enable_confidential_vm"></a> [enable\_confidential\_vm](#input\_enable\_confidential\_vm) | Enable Confidential VM. If true, on host maintenance will be set to TERMINATE | `bool` | `false` | no |
| <a name="input_enable_oslogin"></a> [enable\_oslogin](#input\_enable\_oslogin) | Enables OS Login service on the VM | `bool` | `false` | no |
| <a name="input_env_vars"></a> [env\_vars](#input\_env\_vars) | Key-value pairs representing environment variables and their respective values | `map(any)` | n/a | yes |
| <a name="input_expose_healthz_publicly"></a> [expose\_healthz\_publicly](#input\_expose\_healthz\_publicly) | Exposes the /healthz endpoint publicly even if Atlantis is protected by IAP | `bool` | `false` | no |
| <a name="input_expose_metrics_publicly"></a> [expose\_metrics\_publicly](#input\_expose\_metrics\_publicly) | Exposes the /metrics endpoint publicly even if Atlantis is protected by IAP | `bool` | `false` | no |
| <a name="input_google_logging_enabled"></a> [google\_logging\_enabled](#input\_google\_logging\_enabled) | Enable Google Cloud Logging | `bool` | `true` | no |
| <a name="input_google_logging_use_fluentbit"></a> [google\_logging\_use\_fluentbit](#input\_google\_logging\_use\_fluentbit) | Enable Google Cloud Logging using Fluent Bit | `bool` | `false` | no |
Expand Down
8 changes: 8 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,14 @@ resource "google_compute_url_map" "default" {
service = google_compute_backend_service.default.id
}
}

dynamic "path_rule" {
for_each = var.expose_healthz_publicly ? [1] : []
content {
paths = ["/healthz"]
service = google_compute_backend_service.default.id
}
}
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ variable "expose_metrics_publicly" {
default = false
}

variable "expose_healthz_publicly" {
type = bool
description = "Exposes the /healthz endpoint publicly even if Atlantis is protected by IAP"
default = false
}

variable "google_logging_enabled" {
type = bool
description = "Enable Google Cloud Logging"
Expand Down

0 comments on commit 9b85ba1

Please sign in to comment.