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

[WIP] Cron monitors #577

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

[WIP] Cron monitors #577

wants to merge 6 commits into from

Conversation

cysp
Copy link

@cysp cysp commented Feb 12, 2025

👋 this is not ready for real review, though the api response implementation is complete enough to successfully read an imported resource.

I'm posting this for early guidance and feedback on the proposed resource schema, in particular the complex configuration sub-object (and also general code organisation and implementation).

A cron monitor resource defined using this schema would look like this:

resource "sentry_monitor" "this" {
  organization = var.sentry_org

  project = var.sentry_project_slug
  type    = "cron_job"
  name    = "My cool cron monitor"
  slug    = "my-cool-cron-monitor"

  status   = "active"
  is_muted = true

  config = {
    alert_rule_id           = null
    checkin_margin          = 30
    failure_issue_threshold = null
    max_runtime             = 360
    recovery_threshold      = null
    # schedule_crontab        = "0 0 * * *"
    schedule_interval = {
      # year    = null
      # month   = null
      # week = null
      day  = 1
      # weekday = null
      # hour = null
      # minute  = null
    }
    timezone = "UTC"
  }
}

@cysp
Copy link
Author

cysp commented Mar 11, 2025

@jianyuan 👋 any thoughts on this schema design (and partial implementation)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant