3 page_title: "Mailgun: mailgun_route"
4 sidebar_current: "docs-mailgun-route"
6 The route_resource allows mailgun route to be managed by Terraform.
11 The route resource allows Mailgun route to be managed by Terraform.
16 resource "mailgun_route" "example" {
18 description="description"
19 expression="match_recipient(\".*@samples.mailgun.org\")"
21 "forward(\"http://myhost.com/messages/\")",
29 The following arguments are supported:
31 * `priority` - (Required)Integer: smaller number indicates higher priority. Higher priority routes are handled first.
32 * `expression` - (Required) An arbitrary string.
33 * `description` - (Required) A filter expression like match_recipient('.*@gmail.com')
34 * `actions` - (Required) Route action. This action is executed when the expression evaluates to True. Example: forward("alice@example.com") You can pass multiple action parameters.
37 ## Attributes Reference
39 The following attribute is exported:
41 * `route_id` - ID of the route.
42 * `created_at` - The date of creation of the route.
46 Mailgun can be imported using the route ID, e.g.
49 tf import mailgun_route.example 4f3bad2335335426750048c6