The original provider at https://www.terraform.io/docs/providers/mailgun/ has been upgraded to use the v3 API. Please migrate to that provider, this project is archived. Please see #19 for details.
This is a terraform provider that lets you provision email related resources on mailgun host via Terraform. It's powered by mailgun-go, using v3 of the Mailgun API.
Download a binary, and put it in a good spot on your system. Then update your ~/.terraformrc
to refer to the binary:
providers {
mailgunv3 = "/path/to/terraform-provider-mailgunv3"
}
You can also place the binary inside the plugin folder, which varies based on your operating system. Refer to the third-party providers documentation for more information.
For general use, see the docs for more information.
provider "mailgunv3" {
api_key = "key-5555555555555555555"
}
resource "mailgunv3_domain" "default" {
name = "test.terraformv3.example.com"
spam_action = "disabled"
smtp_password = "foobar"
}
resource "mailgunv3_route" "default" {
priority = "0"
description = "inbound"
expression = "match_recipient('.*@foo.example.com')"
actions = [
"forward('http://example.com/api/v1/foos/')",
"stop()"
]
}
Install Glide, then:
# Ensure that this folder is at the following location: `${GOPATH}/src/github.com/phillbaker/terraform-provider-mailgunv3`
cd $GOPATH/src/github.com/phillbaker/terraform-provider-mailgunv3
glide install
go build -o /path/to/binary/terraform-provider-mailgunv3
See LICENSE.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)