Skip to content

Commit

Permalink
Merge pull request #1895 from marco-lancini/email-routing-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz authored Sep 8, 2022
2 parents 2b2e1f0 + c64c68b commit af89047
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 44 deletions.
7 changes: 7 additions & 0 deletions .changelog/1895.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:note
resource/cloudflare_email_routing_rule: Fix example resource to use correct syntax
```

```release-note:note
resource/cloudflare_email_routing_rule_catch_all: Fix example resource to use correct syntax
```
25 changes: 21 additions & 4 deletions docs/resources/email_routing_catch_all.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
---
page_title: "cloudflare_email_routing_catch_all Resource - Cloudflare"
page_title: "cloudflare_email_routing_rule_catch_all Resource - Cloudflare"
subcategory: ""
description: |-
Provides a resource for managing Email Routing Addresses catch all behaviour.
---

# cloudflare_email_routing_catch_all (Resource)
# cloudflare_email_routing_rule_catch_all (Resource)

Provides a resource for managing Email Routing Addresses catch all behaviour.

## Example Usage

```terraform
resource "cloudflare_email_routing_rule_catch_all" "main" {
zone_id = "0da42c8d2132a9ddaf714f9e7c920711"
name = "terraform rule"
enabled = true
matcher {
type = "all"
}
action {
type = "forward"
value = ["[email protected]"]
}
}
```


<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -50,5 +69,3 @@ Optional:

- `field` (String) Field for type matcher.
- `value` (String) Value for matcher.


27 changes: 11 additions & 16 deletions docs/resources/email_routing_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,17 @@ resource "cloudflare_email_routing_rule" "main" {
zone_id = "0da42c8d2132a9ddaf714f9e7c920711"
name = "terraform rule"
enabled = true
matchers = [
{
type = "literal",
field = "to",
value = "[email protected]"
}
]
actions = [
{
type = "forward"
value = ["[email protected]"]
}
]
matcher {
type = "literal"
field = "to"
value = "[email protected]"
}
action {
type = "forward"
value = ["[email protected]"]
}
}
```
<!-- schema generated by tfplugindocs -->
Expand Down Expand Up @@ -72,5 +69,3 @@ Optional:

- `field` (String) Field for type matcher.
- `value` (String) Value for matcher.


23 changes: 10 additions & 13 deletions examples/resources/cloudflare_email_routing_rule/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@ resource "cloudflare_email_routing_rule" "main" {
zone_id = "0da42c8d2132a9ddaf714f9e7c920711"
name = "terraform rule"
enabled = true
matchers = [
{
type = "literal",
field = "to",
value = "[email protected]"
}
]

actions = [
{
type = "forward"
value = ["[email protected]"]
}
]
matcher {
type = "literal"
field = "to"
value = "[email protected]"
}

action {
type = "forward"
value = ["[email protected]"]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ resource "cloudflare_email_routing_rule_catch_all" "main" {
zone_id = "0da42c8d2132a9ddaf714f9e7c920711"
name = "terraform rule"
enabled = true
matchers = [
{
type = "all",
}
]

actions = [
{
type = "forward"
value = ["[email protected]"]
}
]
matcher {
type = "all"
}

action {
type = "forward"
value = ["[email protected]"]
}
}

0 comments on commit af89047

Please sign in to comment.