Terrform Provider for Managing Dkron Jobs

Terraform Provider Dkron

Provider for managing https://dkron.io/ jobs.

Usage examples

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"
  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"
  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 provider

Special thank to https://github.com/andreygolev for improving the initial provider


Terraform Provider Dkron

Run the following command to build the provider

go build -o terraform-provider-dkron

Test sample configuration

First, build and install the provider.

make install

Then, run the following command to initialize the workspace and apply the sample configuration.

terraform init && terraform apply
Similar Resources

Terraform-provider-age - Age Terraform Provider with golang

Age Terraform Provider This provider lets you generate an Age key pair. Using th

Feb 15, 2022

Terraform-equinix-migration-tool - Tool to migrate code from Equinix Metal terraform provider to Equinix terraform provider

Equinix Terraform Provider Migration Tool This tool targets a terraform working

Feb 15, 2022

Blast is a simple tool for API load testing and batch jobs

Blast Blast makes API requests at a fixed rate. The number of concurrent workers is configurable. The rate may be changed interactively during executi

Nov 10, 2022

Drone plugin for trigger Jenkins jobs.

Drone plugin for trigger Jenkins jobs.

drone-jenkins Drone plugin for trigger Jenkins jobs. Setup the Jenkins Server Setup the Jenkins server using the docker command: $ docker run \ --na

Sep 27, 2022

Set of Kubernetes solutions for reusing idle resources of nodes by running extra batch jobs

Caelus Caelus is a set of Kubernetes solutions for reusing idle resources of nodes by running extra batch jobs, these resources come from the underuti

Nov 22, 2022

An operator for managing ephemeral clusters in GKE

Test Cluster Operator for GKE This operator provides an API-driven cluster provisioning for integration and performance testing of software that integ

Oct 22, 2022

A web server for managing VirtualBox vms remotely(using VirtualBox CLI: vboxmanage)

VirtualBox-Manager A simple http server(using echo) and virtualbox wrapper for controlling virtualbox vms remotly. available commands: status on off s

Nov 4, 2022

A fluxcd controller for managing remote manifests with kubecfg

kubecfg-operator A fluxcd controller for managing remote manifests with kubecfg This project is in very early stages proof-of-concept. Only latest ima

Nov 1, 2022

Managing your Kubernetes clusters (including public, private, edge, etc) as easily as visiting the Internet

Clusternet Managing Your Clusters (including public, private, hybrid, edge, etc) as easily as Visiting the Internet. Clusternet (Cluster Internet) is

Dec 30, 2022
OpenAPI Terraform Provider that configures itself at runtime with the resources exposed by the service provider (defined in a swagger file)
OpenAPI Terraform Provider that configures itself at runtime with the resources exposed by the service provider (defined in a swagger file)

Terraform Provider OpenAPI This terraform provider aims to minimise as much as possible the efforts needed from service providers to create and mainta

Dec 26, 2022
Terraform provider to help with various AWS automation tasks (mostly all that stuff we cannot accomplish with the official AWS terraform provider)
Terraform provider to help with various AWS automation tasks (mostly all that stuff we cannot accomplish with the official AWS terraform provider)

terraform-provider-awsutils Terraform provider for performing various tasks that cannot be performed with the official AWS Terraform Provider from Has

Dec 8, 2022
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)

Terraform Provider for Azure (Resource Manager) Version 2.x of the AzureRM Provider requires Terraform 0.12.x and later, but 1.0 is recommended. Terra

Oct 16, 2021
provider-kubernetes is a Crossplane Provider that enables deployment and management of arbitrary Kubernetes objects on clusters

provider-kubernetes provider-kubernetes is a Crossplane Provider that enables deployment and management of arbitrary Kubernetes objects on clusters ty

Dec 14, 2022
Terraform-provider-mailcow - Terraform provider for Mailcow

Terraform Provider Scaffolding (Terraform Plugin SDK) This template repository i

Dec 31, 2021
Provider-generic-workflows - A generic provider which uses argo workflows to define the backend actions.

provider-generic-workflows provider-generic-workflows is a generic provider which uses argo workflows for managing the external resource. This will re

Jan 1, 2022
Terraform-provider-buddy - Terraform Buddy provider For golang

Terraform Provider for Buddy Documentation Requirements Terraform >= 1.0.11 Go >

Jan 5, 2022
Hashicups-tf-provider - HashiCups Terraform Provider Tutorial

Terraform Provider HashiCups Run the following command to build the provider go

Jan 10, 2022
Terraform-provider-vercel - Terraform Vercel Provider With Golang

Vercel Terraform Provider Website: https://www.terraform.io Documentation: https

Dec 14, 2022
Provider-milvus - Milvus provider for crossplane

provider-milvus provider-milvus is a minimal Crossplane Provider that is meant t

Feb 9, 2022