This provider allows you to manage jobs, folders, and status pages using the cron-job.org API or a compatible self-hosted service.
terraform {
required_providers {
cronjoborg = {
source = "plain-insure/cronjoborg"
version = "~> 1.0"
}
}
}git clone https://github.com/plain-insure/terraform-provider-cronjoborg.git
cd terraform-provider-cronjoborg
make build
make installprovider "cronjoborg" {
api_url = "https://api.cron-job.org/" # Optional, defaults to cron-job.org API
api_key = var.cron_job_api_key # Required, or set CRON_JOB_API_KEY env var
}# Create a folder
resource "cronjoborg_folder" "monitoring" {
title = "Monitoring Jobs"
}
# Create a cron job
resource "cronjoborg_job" "health_check" {
title = "Health Check"
url = "https://example.com/health"
}
# Create a status page
resource "cronjoborg_status_page" "uptime" {
title = "Service Uptime"
}For more examples, see the examples/ directory.
The provider requires an API key from cron-job.org. You can obtain one by:
- Creating an account at cron-job.org
- Generating an API key in your account settings
Set the API key using one of these methods:
export CRON_JOB_API_KEY="your-api-key-here"provider "cronjoborg" {
api_key = "your-api-key-here"
}variable "cron_job_api_key" {
description = "API key for cron-job.org"
type = string
sensitive = true
}
provider "cronjoborg" {
api_key = var.cron_job_api_key
}cronjoborg_job- Manages cron jobscronjoborg_folder- Manages folders for organizing jobscronjoborg_status_page- Manages status pages
Full documentation is available on the Terraform Registry.
See CONTRIBUTING.md for development setup and contribution guidelines.
# Clone the repository
git clone https://github.com/plain-insure/terraform-provider-cronjoborg.git
cd terraform-provider-cronjoborg
# Install development tools
make dev-setup
# Build the provider
make build
# Run tests
make test
# Install locally for testing
make installRun make help to see all available targets:
make helpThis project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- 🐛 For bug reports and feature requests, please use GitHub Issues
- 💬 For questions and discussions, please use GitHub Discussions
- 📖 Check out the examples for common use cases