terraform-provider-stackit icon indicating copy to clipboard operation
terraform-provider-stackit copied to clipboard

feat(observability): implement cert and http checks

Open h3adex opened this issue 2 months ago • 5 comments

Description

This PR introduces http and cert_check Terraform support. Once an HTTP or certificate check is created, you can query thanos within the observability stack for metrics (e.g http_response_result_code) and create alerts based on them.

APIs: https://docs.api.stackit.cloud/documentation/argus/version/v1#tag/http-check https://docs.api.stackit.cloud/documentation/argus/version/v1#tag/cert-check

E2E Tests

resource "stackit_observability_instance" "example" {
  project_id = var.stackit_project_id
  name       = "example-instance"
  plan_name  = "Observability-Medium-EU01"
  alert_config = null
}

resource "stackit_observability_http_check" "http_check" {
  project_id = var.stackit_project_id
  instance_id = stackit_observability_instance.example.instance_id
  url = "https://www.example.de"
}

data "stackit_observability_http_check" "test" {
  project_id = var.stackit_project_id
  instance_id = stackit_observability_instance.example.instance_id
  http_check_id = stackit_observability_http_check.http_check.http_check_id
}

resource "stackit_observability_http_check" "http_check_2" {
  project_id = var.stackit_project_id
  instance_id = stackit_observability_instance.example.instance_id
  url = "https://www.stackit.de"
}

resource "stackit_observability_cert_check" "cert_check" {
  project_id = var.stackit_project_id
  instance_id = stackit_observability_instance.example.instance_id
  source = "tcp://stackit.de:443"
}

data "stackit_observability_cert_check" "test" {
  project_id = var.stackit_project_id
  instance_id = stackit_observability_instance.example.instance_id
  cert_check_id = stackit_observability_cert_check.cert_check.cert_check_id
}

Checklist

  • [x] Issue was linked above
  • [x] Code format was applied: make fmt
  • [x] Examples were added / adjusted (see examples/ directory)
  • [x] Docs are up-to-date: make generate-docs (will be checked by CI)
  • [x] Unit tests got implemented or updated
  • [x] Acceptance tests got implemented or updated (see e.g. here)
  • [x] Unit tests are passing: make test (will be checked by CI)
  • [x] No linter issues: make lint (will be checked by CI)

h3adex avatar Oct 28 '25 14:10 h3adex

E2E Test Result:

Screenshot 2025-10-29 at 09 26 02 Screenshot 2025-10-29 at 09 28 38

h3adex avatar Oct 29 '25 08:10 h3adex

This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.

github-actions[bot] avatar Nov 06 '25 02:11 github-actions[bot]

This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.

github-actions[bot] avatar Nov 14 '25 02:11 github-actions[bot]

Waiting for answer from obs-team

h3adex avatar Nov 19 '25 12:11 h3adex

This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.

github-actions[bot] avatar Nov 28 '25 02:11 github-actions[bot]

This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.

github-actions[bot] avatar Dec 12 '25 03:12 github-actions[bot]