terraform-provider-mxroute

command module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2026 License: MIT Imports: 5 Imported by: 0

README

terraform-provider-mxroute

Tests Go Reference

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL