https://github.com/bozerkins/terraform-provider-dkron
Terrform Provider for Managing Dkron Jobs
https://github.com/bozerkins/terraform-provider-dkron
Last synced: about 1 month ago
JSON representation
Terrform Provider for Managing Dkron Jobs
- Host: GitHub
- URL: https://github.com/bozerkins/terraform-provider-dkron
- Owner: bozerkins
- License: mit
- Created: 2021-11-04T10:48:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-09T04:16:03.000Z (about 1 year ago)
- Last Synced: 2025-04-18T00:10:49.944Z (about 2 months ago)
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform Provider Dkron
Provider for managing https://dkron.io/ jobs.
# Usage examples
```terraform
terraform {
required_providers {
dkron = {
version = "0.2"
source = "registry.terraform.io/bozerkins/dkron"
}
}
}provider "dkron" {
host = "http://localhost:8080"
}resource "dkron_job" "job1" {
name = "job1"
timezone = "Europe/Riga"
executor = "shell"
command = "date"
env = "EDITOR=vi"
cwd = ""
shell = false
allowed_exitcodes = "0, 199, 255"
schedule = "@every 10m"
timeout = "9s"
mem_limit_kb = "16384"
project = "myproject"
disabled = false
retries = 5
concurrency = "forbid"tags = {
"myproject" = "dumdum:2"
}# out to fluent
processors {
type = "fluent"
}
}resource "dkron_job" "job2" {
name = "job2"
timezone = "Europe/Riga"
executor = "shell"
command = "date"
env = "ENV1=envone"
cwd = ""
shell = false
allowed_exitcodes = "0, 199, 255"
schedule = "@every 10m"
timeout = "9s"
mem_limit_kb = "16384"
project = "myproject"
disabled = false
retries = 5
concurrency = "forbid"tags = {
"myproject" = "dumdum"
}processors {
type = "log"
}
}
```## Usability notes
Dkron API is poorly documented and doesn't always work as in documentation. Because of that some inconsistencies may arise## Known issues
Processors order doesn't really work, so using more than one processor isn't advised.
This happens because of how Go serializes JSON and how Dkron Job API works.# Acknoledgments
This provider is based on https://github.com/peertransfer/terraform-provider-dkron providerSpecial thank to https://github.com/andreygolev for improving the initial provider
---
# Terraform Provider DkronRun the following command to build the provider
```shell
go build -o terraform-provider-dkron
```## Test sample configuration
First, build and install the provider.
```shell
make install
```Then, run the following command to initialize the workspace and apply the sample configuration.
```shell
terraform init && terraform apply
```