-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add support for 'msteams' recipients #386
Conversation
} | ||
if v, ok := d.GetOk("detail_filter"); ok { | ||
rcptFilter = expandRecipientFilter(v.([]interface{})) | ||
if rcptFilter.Type != matchType { |
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.
This seems like a fine tradeoff to not have to introduce more complex logic for webhooks and teams being more or less equivalent. We don't fail as fast, but 🤷🏻
@@ -18,9 +18,9 @@ import ( | |||
"github.com/honeycombio/terraform-provider-honeycombio/internal/models" | |||
) | |||
|
|||
func notificationRecipientSchema() schema.SetNestedBlock { | |||
func notificationRecipientSchema(allowedTypes []client.RecipientType) schema.SetNestedBlock { |
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.
This fixes the bug introduced by the refactor
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.
Good catch!!
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.
This looks great, thank you!!
@@ -18,9 +18,9 @@ import ( | |||
"github.com/honeycombio/terraform-provider-honeycombio/internal/models" | |||
) | |||
|
|||
func notificationRecipientSchema() schema.SetNestedBlock { | |||
func notificationRecipientSchema(allowedTypes []client.RecipientType) schema.SetNestedBlock { |
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.
Good catch!!
Adds supports for
msteams
recipients.Also fixes a "sneaky bug" where a previous refactor would allow
marker
type recipients on Burn Alerts during the validation stage (the API still would reject them).