-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resource/cloudflare_email_routing_catch_all: switch to a dedicated scheme #1947
Conversation
…heme Compared to a normal email routing rule, the catch-all rule: * Does not have a priority * For matchers, it accepts only type = "all", and there are no "field" and "value" properties * For actions, it accepts type = "drop" besides "forward" and "worker" Ref: https://api.cloudflare.com/#email-routing-routing-rules-update-routing-rule Ref: https://api.cloudflare.com/#email-routing-routing-rules-update-catch-all-rule Fixes #1937
changelog detected ✅ |
As a side note, an API response for the catch-all rule contains {
"result": {
"tag": "xxx",
"name": "Catch-all rule",
"matchers": [
{
"type": "all"
}
],
"actions": [
{
"type": "drop"
}
],
"enabled": true,
"priority": 2147483647
},
"success": true,
"errors": [],
"messages": []
} I'm not sure if |
if it's not in the public API, we'll need to wait until it's declared stable (and documented) before we implement it here. are you able to run |
Elem: &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"type": { | ||
Description: "Type of matcher.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description: "Type of matcher.", | |
Description: fmt.Sprintf("Type of matcher. %s", renderAvailableDocumentationValuesStringSlice([]string{"all"})), |
(don't forget to update your imports for fmt
)
Elem: &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"type": { | ||
Description: "Type of supported action.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description: "Type of supported action.", | |
Description: fmt.Sprintf("Type of supported action. %s", renderAvailableDocumentationValuesStringSlice([]string{"drop", "forward", "worker"})), |
ValidateFunc: validation.StringInSlice([]string{"drop", "forward", "worker"}, true), | ||
}, | ||
"value": { | ||
Description: "An array with items in the following form.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description: "An array with items in the following form.", | |
Description: "A list with items in the following form.", |
Thanks! Descriptions are improved.
Got it! Then I will omit the priority in codes for now.
|
thanks @yan12125 💯 you rock! |
This functionality has been released in v3.25.0 of the Terraform Cloudflare Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Cool, thanks! |
Detail ====== - the `action` should be one of `forward`, `worker`, `drop`, but there was no `drop` in latest provider. - ref: cloudflare#1947
Detail ====== - the `action` should be one of `forward`, `worker`, `drop`, but there was no `drop` in latest provider. - ref: cloudflare#1947
Detail ====== - the `action` should be one of `forward`, `worker`, `drop`, but there was no `drop` in latest provider. - ref: cloudflare#1947
Compared to a normal email routing rule, the catch-all rule:
Ref: https://api.cloudflare.com/#email-routing-routing-rules-update-routing-rule
Ref: https://api.cloudflare.com/#email-routing-routing-rules-update-catch-all-rule
Fixes #1937