Skip to content

Repository files navigation

terraform-provider-mxroute

Tests Go Reference License: MIT

Terraform provider for MXroute email hosting, built on the MXroute REST API. Manages domains, mailboxes, forwarders, catch-all behaviour, spam filtering, and (where the account is reseller-enabled) reseller packages and users.

Published on the Terraform Registry and the OpenTofu Registry as demon/mxroute.

Install

terraform {
  required_providers {
    mxroute = {
      source  = "demon/mxroute"
      version = "~> 0.5"
    }
  }
}

Authenticate

Generate an API key at panel.mxroute.com/api-keys.php and configure the provider with three values, either as arguments or via environment variables (MXROUTE_SERVER, MXROUTE_USERNAME, MXROUTE_APIKEY).

provider "mxroute" {
  server   = "eagle.mxlogin.com"
  username = "myusername"
  apikey   = "..." # prefer MXROUTE_APIKEY
}

resource "mxroute_domain" "example" {
  name = "example.com"
}

resource "mxroute_mail_hosting" "example" {
  domain  = mxroute_domain.example.name
  enabled = true
}

Full schema and per-resource examples live under docs/ (also browsable on the Registry).

Develop

Requires the Go version pinned in go.mod.

make build         # go build
make test          # unit tests
make lint          # golangci-lint
make generate      # regenerate docs from schema + examples

Acceptance tests hit the live API and need TF_ACC=1 plus a dedicated test account:

export MXROUTE_SERVER=eagle.mxlogin.com
export MXROUTE_USERNAME=myusername
export MXROUTE_APIKEY=...
export MXROUTE_TEST_DOMAIN=test.example.com
make testacc

See CONTRIBUTING.md for the full workflow, including how to add a new resource. Security issues: see SECURITY.md.

License

MIT

About

Terraform/OpenTofu provider for MXRoute

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

2 watching

Forks

Releases

Contributors

Languages