Add params to allow alert routing to Teams via logic app#196
Merged
Conversation
3376660 to
a9ed727
Compare
Contributor
Author
|
Test plan for apply-for-teacher-training production: For each Azure alert, action is updated to include webhook_properties as per below (requires replacement of action),
|
a24b78f to
01c47d6
Compare
RMcVelia
reviewed
Jun 9, 2026
| action { | ||
| action_group_id = data.azurerm_monitor_action_group.main[0].id | ||
| webhook_properties = { | ||
| target_channels = local.alert_target_channels |
Contributor
There was a problem hiding this comment.
why not just set alert_target_channels to var.service_short?
Contributor
Author
There was a problem hiding this comment.
over engineering, it was going to allow us to manage multiple targets more easily (eg alert to Infra and service) but that was going to be more work than wanted for this. Will change to use var directly.
01c47d6 to
6b4c296
Compare
6b4c296 to
4bff615
Compare
RMcVelia
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
migrate azure monitoring to teams
We use Azure monitor for postgres and redis alerting, which goes to an infra email address, we want the alerts to go to the relevant services alert teams channel.
Changes proposed in this pull request
This change is required for PR Migrate Azure Monitoring Notifications to Teams, it adds parameters to the alert payload to allow routing within a logic app to the appropriate teams channel. This PR will generate the parameters for each service so they are included in payloads but it will not have any effect until they are consumed by the logic app (or other services).
Guidance to review
To validate, ensure that terraform plans show the addition of the correct parameters to alerts, namely the service short code and environment name.
Edit global_config/.sh so
TERRAFORM_MODULES_TAG=2677-logicapp-for-teams-notificationsEnsure that changes are to alerts and payload, the relevant services short code is used and correct environment.