Skip to content

pehlicd/terraform-provider-keep

Repository files navigation

terraform-provider-keep

docs downloads latest version license

This is a terraform provider for managing your keep instance.

Note: This provider is not official terraform provider for keep.

Installation

Add the following to your terraform configuration

terraform {
  required_providers {
    keep = {
      source  = "pehlicd/keep"
      version = "~> 0.0.1"
    }
  }
}

Example

provider "keep" {
  backend_url = "http://localhost:8080" # or use environment variable KEEP_BACKEND_URL
  api_key = "your apikey" # or use environment variable KEEP_API_KEY
}

resource "keep_workflow" "example_workflow" {
  workflow_file_path = "path/to/workflow.yml"
}

resource "keep_mapping" "example_mapping" {
  name = "example_mapping"
  mapping_file_path = "path/to/mapping.yml"
  matchers = [
    "your unique matcher",
  ]
  #priority = 1 (optional)
}

resource "keep_provider" "example_provider" {
  name = "example_provider"
  type = "supported_provider_type"
  auth_config = {
    //...
    // Add your provider specific configuration
    //...
  }
  #install_webhook = true (optional)
}

data "keep_workflow" "example_workflow_data" {
  id = keep_workflow.example_workflow.id
}

data "keep_mapping" "example_mapping_data" {
  id = keep_mapping.example_mapping.id
}

For more information, please refer to the documentation.

You can also find some hands-on examples in the examples directory.

You feel overwhelmed with these bunch of information? Don't worry, we got you covered. Just join keep slack workspace and throw your questions.

Slack