]> git.immae.eu Git - github/fretlink/terraform-provider-mailgun.git/blame - website/docs/r/route.html.markdown
ci: add encrypted token to publish gh pages
[github/fretlink/terraform-provider-mailgun.git] / website / docs / r / route.html.markdown
CommitLineData
a1f9b9a1
AG
1---
2layout: "mailgun"
3page_title: "Mailgun: mailgun_route"
4sidebar_current: "docs-mailgun-route"
5description: |-
6 The route_resource allows mailgun route to be managed by Terraform.
7---
8
9# mailgun\_route
10
11The route resource allows Mailgun route to be managed by Terraform.
12
13## Example Usage
14
15```hcl
16resource "mailgun_route" "example" {
17 priority=5
18 description="description"
19 expression="match_recipient(\".*@samples.mailgun.org\")"
20 actions=[
21 "forward(\"http://myhost.com/messages/\")",
22 "stop()"
23 ]
24}
25```
26
27## Argument Reference
28
29The following arguments are supported:
30
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.
35
36
37## Attributes Reference
38
39The following attribute is exported:
40
41* `route_id` - ID of the route.
42* `created_at` - The date of creation of the route.
43
44## Import
45
46Mailgun can be imported using the route ID, e.g.
47
48```
49tf import mailgun_route.example 4f3bad2335335426750048c6
50
51```