{"id":51413019,"url":"https://github.com/steadycron/terraform-provider-steadycron","last_synced_at":"2026-07-04T16:03:50.489Z","repository":{"id":363879643,"uuid":"1264279831","full_name":"steadycron/terraform-provider-steadycron","owner":"steadycron","description":"Terraform provider to manage and automate SteadyCron monitors, cron jobs, heartbeats, and HTTP execution alerts.","archived":false,"fork":false,"pushed_at":"2026-07-03T16:42:21.000Z","size":192,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-03T18:23:04.691Z","etag":null,"topics":["cronjob","gitops","iac","infrastructure-as-code","monitoring-as-code","terraform"],"latest_commit_sha":null,"homepage":"https://steadycron.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steadycron.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-09T18:29:44.000Z","updated_at":"2026-07-03T16:42:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/steadycron/terraform-provider-steadycron","commit_stats":null,"previous_names":["steadycron/terraform-provider-steadycron"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/steadycron/terraform-provider-steadycron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadycron%2Fterraform-provider-steadycron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadycron%2Fterraform-provider-steadycron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadycron%2Fterraform-provider-steadycron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadycron%2Fterraform-provider-steadycron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steadycron","download_url":"https://codeload.github.com/steadycron/terraform-provider-steadycron/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadycron%2Fterraform-provider-steadycron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35127470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cronjob","gitops","iac","infrastructure-as-code","monitoring-as-code","terraform"],"created_at":"2026-07-04T16:03:49.994Z","updated_at":"2026-07-04T16:03:50.481Z","avatar_url":"https://github.com/steadycron.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Provider for [SteadyCron](https://steadycron.com)\n\n[![CI](https://github.com/steadycron/terraform-provider-steadycron/actions/workflows/ci.yml/badge.svg)](https://github.com/steadycron/terraform-provider-steadycron/actions/workflows/ci.yml)\n[![Registry](https://img.shields.io/badge/Terraform_Registry-steadycron%2Fsteadycron-blue)](https://registry.terraform.io/providers/steadycron/steadycron/latest)\n[![License: MPL-2.0](https://img.shields.io/badge/License-MPL_2.0-blue.svg)](LICENSE)\n\nThe official Terraform provider for [SteadyCron](https://steadycron.com) — manage\ncron jobs, heartbeat monitors, alert channels, and alert rules as infrastructure as code\nalongside the rest of your Terraform stack. Declare schedules, alert routing, and\nmonitoring configuration in HCL and keep them in sync with `plan` / `apply` / `import`.\n\n## Requirements\n\n- [Terraform](https://developer.hashicorp.com/terraform/downloads) \u003e= 1.0\n- [Go](https://golang.org/doc/install) \u003e= 1.22 (to build from source)\n- A SteadyCron account and a **Full**-scope API key for write operations\n\n## Install\n\nAdd the provider to your `required_providers` block:\n\n```hcl\nterraform {\n  required_providers {\n    steadycron = {\n      source  = \"steadycron/steadycron\"\n      version = \"1.0.4\"\n    }\n  }\n}\n```\n\nThen run `terraform init`.\n\n## Authentication\n\nCreate an API key in the SteadyCron dashboard under **Settings → API keys**.\n\n- **Full**-scope key: required for `apply` (create/update/delete).\n- **Read-only**-scope key: sufficient for data sources only.\n\nProvide the key via an environment variable (recommended for CI):\n\n```bash\nexport STEADYCRON_API_KEY=sc_...\n```\n\nOr in the provider block (avoid committing this to version control):\n\n```hcl\nprovider \"steadycron\" {\n  api_key = \"sc_...\"   # or use var.steadycron_api_key\n}\n```\n\n## Provider configuration\n\n```hcl\nprovider \"steadycron\" {\n  # optional; defaults to https://api.steadycron.com\n  # can also be set via STEADYCRON_ENDPOINT\n  endpoint = \"https://api.steadycron.com\"\n\n  # required; Full-scope key for writes\n  # can also be set via STEADYCRON_API_KEY\n  api_key = var.steadycron_api_key\n}\n```\n\n## Rate limits\n\nThe SteadyCron API allows **120 requests per minute per key**. The provider automatically retries\n`429 Too Many Requests` responses with exponential backoff + jitter (up to 5 retries, respecting\n`Retry-After` headers). If you hit limits regularly, reduce provider parallelism with\n`terraform apply -parallelism=5`.\n\n## Resources and data sources\n\n| Resource / Data Source | Description |\n|---|---|\n| `steadycron_http_job` | Scheduled HTTPS call |\n| `steadycron_heartbeat_monitor` | Expected-ping monitor with a unique ping URL |\n| `steadycron_alert_channel` | Delivery channel (email, Slack, Discord, webhook, Telegram) |\n| `steadycron_alert_rule` | Links a job to a channel with a trigger condition |\n| `steadycron_tag` | `key=value` label for grouping/filtering jobs |\n| `steadycron_template_variable` | Named placeholder for server-side substitution in job fields |\n| `data.steadycron_http_job` | Look up an HTTP job by ID |\n| `data.steadycron_heartbeat_monitor` | Look up a heartbeat monitor by ID |\n| `data.steadycron_tag` | Look up a tag by ID |\n| `data.steadycron_alert_channel` | Look up an alert channel by ID |\n\n## Example\n\n```hcl\nterraform {\n  required_providers {\n    steadycron = {\n      source  = \"steadycron/steadycron\"\n      version = \"1.0.4\"\n    }\n  }\n}\n\nprovider \"steadycron\" {\n  # api_key from STEADYCRON_API_KEY env var\n}\n\nresource \"steadycron_tag\" \"env_prod\" {\n  key   = \"env\"\n  value = \"prod\"\n  color = \"green\"\n}\n\nresource \"steadycron_alert_channel\" \"ops_email\" {\n  name     = \"ops-email\"\n  kind     = \"email\"\n  email_to = \"ops@example.com\"\n}\n\nresource \"steadycron_http_job\" \"weekly_digest\" {\n  name   = \"weekly-digest\"\n  method = \"POST\"\n  url    = \"https://api.example.com/jobs/digest\"\n\n  cron_expression = \"0 9 * * 1\"   # Monday 09:00\n  timezone        = \"Europe/Berlin\"\n\n  timeout_seconds = 120\n  max_retries     = 2\n\n  headers = {\n    Authorization = \"Bearer {{digest_token}}\"\n  }\n\n  tags = [steadycron_tag.env_prod.id]\n}\n\nresource \"steadycron_alert_rule\" \"digest_failure\" {\n  job_id     = steadycron_http_job.weekly_digest.id\n  channel_id = steadycron_alert_channel.ops_email.id\n  trigger    = \"on_failure\"\n  severity   = \"P1\"\n}\n```\n\n## Cron-as-Code interoperability\n\nResources created via Terraform have a null `manifest_namespace`, so they are **never pruned** by\n`steadycron sync --prune`. Manage a resource via Terraform **or** via the CLI/manifest, not both —\nmixing tools for the same resource is unsupported.\n\nIf your team already uses Terraform for infrastructure, the provider is the natural way to bring\ncron jobs under the same code review, state management, and deployment pipeline as the rest of\nyour stack — no separate manifest files or CLI tooling required.\n\n## Code-monitoring SDK integration\n\nBoth job resources expose a `key` attribute (the stable `job_key` identifier). Set it to the\nstable string your application code references:\n\n```hcl\nresource \"steadycron_heartbeat_monitor\" \"db_backup\" {\n  name = \"Nightly DB backup\"\n  key  = \"nightly-db-backup\"   # ← paste this into @steadycron.job(\"…\") or TrackAsync(\"…\")\n  cron_expression = \"0 2 * * *\"\n  grace_seconds   = 1800\n}\n\noutput \"db_backup_key\" {\n  value = steadycron_heartbeat_monitor.db_backup.key\n}\n```\n\n**Rules:**\n- `key` must be unique within the account. A duplicate produces a clear plan/apply error naming the conflicting key.\n- When omitted, the server generates a slug from `name` (visible after `terraform apply`).\n- Renaming `key` is an in-place update — no replacement occurs, but any in-code references must be updated.\n- The SDK resolves the ping token from the key at runtime using `STEADYCRON_API_KEY` (read-only scope is sufficient).\n\nDeclaring the `key` in Terraform means your cron schedule, alert rules, and SDK instrumentation\nall live in the same configuration — the cron job itself and the code that monitors it are\nmanaged as code together.\n\n## Importing existing resources\n\n```bash\nterraform import steadycron_http_job.example \u003cjob_id\u003e\nterraform import steadycron_heartbeat_monitor.db_backup \u003cjob_id\u003e\nterraform import steadycron_alert_channel.ops_email \u003cchannel_id\u003e\nterraform import steadycron_alert_rule.digest_failure \u003crule_id\u003e\nterraform import steadycron_tag.env_prod \u003ctag_id\u003e\nterraform import steadycron_template_variable.digest_token \u003cvariable_id\u003e\n```\n\nAfter importing, run `terraform plan`. Fields that the API redacts on GET (alert channel secrets,\nheartbeat token) will show as diffs — add their values to your configuration.\n\n## Development\n\n```bash\ngit clone https://github.com/steadycron/terraform-provider-steadycron.git\ncd terraform-provider-steadycron\nmake build          # build\nmake test           # unit tests\nmake testacc        # acceptance tests (requires STEADYCRON_API_KEY)\nmake docs           # regenerate docs from schema\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the full development and release process.\n\n## License\n\n[Mozilla Public License 2.0](LICENSE) — same as the HashiCorp Terraform provider ecosystem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadycron%2Fterraform-provider-steadycron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteadycron%2Fterraform-provider-steadycron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadycron%2Fterraform-provider-steadycron/lists"}