Skip to content

Repository files navigation

Terraform Provider for Mergify

Manage Mergify resources via Terraform.

Status

Early development. Currently exposes:

  • mergify_repository_products — manage which Mergify products are enabled on a GitHub repository.

Usage

terraform {
  required_providers {
    mergify = {
      source  = "Mergifyio/mergify"
      version = "~> 0.1"
    }
  }
}

provider "mergify" {
  # token = "..."           # or set MERGIFY_TOKEN
  # endpoint = "https://api.mergify.com/v1"  # or set MERGIFY_ENDPOINT
}

resource "mergify_repository_products" "monorepo" {
  owner      = "Mergifyio"
  repository = "monorepo"
  products   = ["merge_queue", "merge_protections", "ci_insights"]
}

Authentication

Provide a Mergify application key or a GitHub personal access token (see Mergify API auth) via, in priority order:

  1. The token provider attribute
  2. The MERGIFY_TOKEN environment variable
  3. The GITHUB_TOKEN environment variable

Development

make tidy   # populate go.sum
make build  # build the provider
make test   # run tests

To use the locally-built provider, run make install and configure a dev_overrides block in ~/.terraformrc.

License

Mozilla Public License 2.0. See LICENSE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages