Skip to content

A Terraform provider for configuring ImprovMX email forwards

License

Notifications You must be signed in to change notification settings

issyl0/terraform-provider-improvmx

Repository files navigation

terraform-provider-improvmx

A very nascent Terraform provider for configuring ImprovMX email forwards. Uses my ImprovMX Golang API client. Download from the Terraform Registry.

Features

  • Create a domain (ImprovMX creates a wildcard forward for a domain by default).
  • Update a domain (to add/remove whitelabel (Enterprise plans only) and notification email settings).
  • Delete a domain.
  • Import a domain.
  • Create an email forward.
  • Delete an email forward.
  • Import an email forward.
  • Update an email forward (ImprovMX allows updating an email forward to send to more than one address, ie [email protected],[email protected]).
  • Create, update and delete a domain's SMTP credentials.

Usage

terraform {
  required_providers {
    improvmx = {
      source = "issyl0/improvmx"
    }
  }
}

provider "improvmx" {
  // Set the `IMPROVMX_API_TOKEN` environment variable.
}

resource "improvmx_domain" "example" {
  domain = "example.com"
}

resource "improvmx_email_forward" "hello" {
  domain            = "example.com"
  alias_name        = "hello"
  destination_email = "[email protected]"
  depends_on = [improvmx_domain.example]
}

resource "improvmx_email_forward" "wildcard" {
  domain            = "example.com"
  alias_name        = "*"
  destination_email = "[email protected]"
  depends_on = [improvmx_domain.example]
}