Skip to content

Commit

Permalink
mark actions.value optional to account for drop rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Nov 23, 2023
1 parent cc801c3 commit 8ca26a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .changelog/2449.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
```release-note:enhancement
resource/cloudflare_email_routing_rule: add action type `drop`
```

```release-note:enhancement
resource/cloudflare_email_routing_rule: `action.value` is now optional to support `drop` rules not requiring it
```
5 changes: 4 additions & 1 deletion docs/resources/email_routing_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ resource "cloudflare_email_routing_rule" "main" {
Required:

- `type` (String) Type of supported action. Available values: `forward`, `worker`, `drop`.
- `value` (List of String) An array with items in the following form.

Optional:

- `value` (List of String) An array with items in the following form. Only required when `type` is `forward` or `worker`.


<a id="nestedblock--matcher"></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ func resourceCloudflareEmailRoutingRuleSchema() map[string]*schema.Schema {
ValidateFunc: validation.StringInSlice([]string{"forward", "worker", "drop"}, true),
},
"value": {
Description: "An array with items in the following form.",
Description: "An array with items in the following form. Only required when `type` is `forward` or `worker`.",
Type: schema.TypeList,
Required: true,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 90),
Expand Down

0 comments on commit 8ca26a4

Please sign in to comment.