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.
Installation
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.
Usage
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()"
]
}
Development
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
Licence
See LICENSE.
Contributing
- Fork it ( https://github.com/phillbaker/terraform-provider-mailgunv3/fork )
- Create your feature branch (
git checkout -b my-new-feature
)
- Commit your changes (
git commit -am 'Add some feature'
)
- Push to the branch (
git push origin my-new-feature
)
- Create a new Pull Request