Manage Mergify resources via Terraform.
Early development. Currently exposes:
mergify_repository_products— manage which Mergify products are enabled on a GitHub repository.
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"]
}Provide a Mergify application key or a GitHub personal access token (see Mergify API auth) via, in priority order:
- The
tokenprovider attribute - The
MERGIFY_TOKENenvironment variable - The
GITHUB_TOKENenvironment variable
make tidy # populate go.sum
make build # build the provider
make test # run testsTo use the locally-built provider, run make install and configure a
dev_overrides block in ~/.terraformrc.
Mozilla Public License 2.0. See LICENSE.