Skip to content

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
  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)?

@cysp cysp mentioned this pull request Apr 2, 2025
@cysp cysp force-pushed the feat/monitors branch 4 times, most recently from b24afb1 to ef8b9b6 Compare April 14, 2025 22:21
@cysp cysp force-pushed the feat/monitors branch from ef8b9b6 to a4024f4 Compare May 11, 2025 21:44
@cysp
Copy link
Author

cysp commented Jul 15, 2025

fyi: this has stalled because sentry's api does not respect some configuration values upon cron monitor creation (from memory "is muted"), which then causes terraform to treat the newly-created resource as tainted since it does not match the configuration, plan its replacement and get the same result.

i haven't yet raised an issue for the sentry api about this though

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