Thanks for posting your question in the Microsoft Q&A forum.
To enable notifications for PIM role activation requests to a Slack channel, you need to make a few adjustments to your Terraform configuration. Here's how you can modify your azurerm_role_management_policy
resource to achieve this:
- Ensure that the
approver_notifications
block is uncommented and properly configured:
approver_notifications {
notification_level = "Critical"
default_recipients = true # Include configured approvers
additional_recipients = [var.pim_slack_email] # Also notify Slack channel
}
- Make sure the
var.pim_slack_email
variable is correctly set to the email address associated with your Slack channel. - Verify that the
approval_stage
block in theactivation_rules
is properly configured:
approval_stage {
primary_approver {
object_id = var.groups["ad.azure.admins"].id
type = "Group"
}
}
- Ensure that the
var.groups["ad.azure.admins"].id
is correctly set to the Object ID of the Azure AD group containing your admins.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful