-
Notifications
You must be signed in to change notification settings - Fork 2
DTSAM-1020 PRM Entity and Repository changes : Part 1 #2445
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
Open
mattnayler
wants to merge
9
commits into
GA_PRM_Master
Choose a base branch
from
DTSAM-1020__PRM_Entity_and_Repository_Changes__Part1
base: GA_PRM_Master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
DTSAM-1020 PRM Entity and Repository changes : Part 1 #2445
mattnayler
wants to merge
9
commits into
GA_PRM_Master
from
DTSAM-1020__PRM_Entity_and_Repository_Changes__Part1
Conversation
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
Plan Result (aat)
Change Result (Click me) # module.am-prm-action-group.azurerm_resource_group_template_deployment.action-group will be created
+ resource "azurerm_resource_group_template_deployment" "action-group" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-support"
+ output_content = (known after apply)
+ parameters_content = (sensitive value)
+ resource_group_name = "am-shared-infrastructure-aat"
+ template_content = jsonencode(
{
+ "$schema" = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
+ contentVersion = "1.0.0.0"
+ outputs = {
+ actionGroupId = {
+ type = "string"
+ value = "[resourceId('microsoft.insights/actionGroups', parameters('actionGroupName'))]"
}
}
+ parameters = {
+ actionGroupName = {
+ type = "string"
}
+ emailReceiverAddress = {
+ metadata = {
+ description = "Email address of the receiver"
}
+ type = "string"
}
+ emailReceiverName = {
+ metadata = {
+ description = "Name of the email receiver"
}
+ type = "string"
}
+ location = {
+ defaultValue = "global"
+ type = "string"
}
+ shortName = {
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-04-01"
+ location = "[parameters('location')]"
+ name = "[parameters('actionGroupName')]"
+ properties = {
+ emailReceivers = [
+ {
+ emailAddress = "[parameters('emailReceiverAddress')]"
+ name = "[parameters('emailReceiverName')]"
},
]
+ enabled = true
+ groupShortName = "[parameters('shortName')]"
+ smsReceivers = []
+ webhookReceivers = []
}
+ tags = {}
+ type = "microsoft.insights/actionGroups"
},
]
}
)
}
# module.prm-process-failure-alerts["prm-process-1"].azurerm_resource_group_template_deployment.custom_alert[0] will be created
+ resource "azurerm_resource_group_template_deployment" "custom_alert" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-process-1-failure-alert"
+ output_content = (known after apply)
+ parameters_content = jsonencode(
{
+ actionGroupName = {
+ value = "am-prm-support"
}
+ actionGroupRg = {
+ value = "am-shared-infrastructure-aat"
}
+ alertDesc = {
+ value = "Triggers when PRM Process 1 - Find Case Definition Changes fails am-aat."
}
+ alertName = {
+ value = "am-prm-process-1-failure-alert"
}
+ appInsightsName = {
+ value = "am-aat"
}
+ appInsightsQuery = {
+ value = "customEvents | where name == 'PRM Process 1 - Find Case Definition Changes - Failed'"
}
+ commonTags = {
+ value = "eyJhcHBsaWNhdGlvbiI6ImFjY2Vzcy1tYW5hZ2VtZW50IiwiYXV0b1NodXRkb3duIjoidHJ1ZSIsImJ1aWx0RnJvbSI6Imh0dHBzOi8vZ2l0aHViLmNvbS9ITUNUUy9hbS1vcmctcm9sZS1tYXBwaW5nLXNlcnZpY2UuZ2l0IiwiYnVzaW5lc3NBcmVhIjoiQ0ZUIiwiY29udGFjdFNsYWNrQ2hhbm5lbCI6IiNhbS1tYXN0ZXItYnVpbGRzIiwiZW52aXJvbm1lbnQiOiJzdGFnaW5nIiwibWFuYWdlZEJ5IjoiQU0ifQ=="
}
+ customEmailSubject = {
+ value = "Alert: PRM Process 1 - Find Case Definition Changes failed in am-aat"
}
+ frequencyInMinutes = {
+ value = "15"
}
+ location = {
+ value = "UK South"
}
+ severityLevel = {
+ value = "2"
}
+ timeWindowInMinutes = {
+ value = "10080"
}
+ triggerThreshold = {
+ value = "0"
}
+ triggerThresholdOperator = {
+ value = "GreaterThan"
}
}
)
+ resource_group_name = "am-shared-infrastructure-aat"
+ template_content = jsonencode(
{
+ "$schema" = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
+ contentVersion = "1.0.0.0"
+ parameters = {
+ actionGroupName = {
+ type = "string"
}
+ actionGroupRg = {
+ type = "string"
}
+ alertDesc = {
+ type = "string"
}
+ alertName = {
+ type = "string"
}
+ appInsightsName = {
+ type = "string"
}
+ appInsightsQuery = {
+ type = "string"
}
+ commonTags = {
+ type = "string"
}
+ customEmailSubject = {
+ type = "string"
}
+ frequencyInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ location = {
+ type = "string"
}
+ severityLevel = {
+ defaultValue = "3"
+ type = "string"
}
+ timeWindowInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ triggerThreshold = {
+ type = "string"
}
+ triggerThresholdOperator = {
+ allowedValues = [
+ "GreaterThan",
+ "Equal",
+ "LessThan",
]
+ defaultValue = "GreaterThan"
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-09-01-preview"
+ location = "[parameters('location')]"
+ name = "[parameters('alertName')]"
+ properties = {
+ action = {
+ aznsAction = {
+ actionGroup = [
+ "[resourceId(parameters('actionGroupRg'), 'microsoft.insights/actionGroups', parameters('actionGroupName'))]",
]
+ emailSubject = "[parameters('customEmailSubject')]"
}
+ "odata.type" = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"
+ severity = "[parameters('severityLevel')]"
+ status = "Active"
+ trigger = {
+ consecutiveBreach = 1
+ threshold = "[parameters('triggerThreshold')]"
+ thresholdOperator = "[parameters('triggerThresholdOperator')]"
}
}
+ description = "[parameters('alertDesc')]"
+ enabled = "true"
+ schedule = {
+ frequencyInMinutes = "[parameters('frequencyInMinutes')]"
+ timeWindowInMinutes = "[parameters('timeWindowInMinutes')]"
}
+ skuType = "L1"
+ source = {
+ dataSourceId = "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]"
+ query = "[parameters('appInsightsQuery')]"
+ queryType = "ResultCount"
}
}
+ tags = "[union(variables('tags'), variables('additionalTags'))]"
+ type = "microsoft.insights/scheduledqueryrules"
},
]
+ variables = {
+ additionalTags = {
+ "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]" = "Resource"
}
+ tags = "[base64ToJson(parameters('commonTags'))]"
}
}
)
}
# module.prm-process-failure-alerts["prm-process-2"].azurerm_resource_group_template_deployment.custom_alert[0] will be created
+ resource "azurerm_resource_group_template_deployment" "custom_alert" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-process-2-failure-alert"
+ output_content = (known after apply)
+ parameters_content = jsonencode(
{
+ actionGroupName = {
+ value = "am-prm-support"
}
+ actionGroupRg = {
+ value = "am-shared-infrastructure-aat"
}
+ alertDesc = {
+ value = "Triggers when PRM Process 2 - Find Organisations with Stale Profiles fails am-aat."
}
+ alertName = {
+ value = "am-prm-process-2-failure-alert"
}
+ appInsightsName = {
+ value = "am-aat"
}
+ appInsightsQuery = {
+ value = "customEvents | where name == 'PRM Process 2 - Find Organisations with Stale Profiles - Failed'"
}
+ commonTags = {
+ value = "eyJhcHBsaWNhdGlvbiI6ImFjY2Vzcy1tYW5hZ2VtZW50IiwiYXV0b1NodXRkb3duIjoidHJ1ZSIsImJ1aWx0RnJvbSI6Imh0dHBzOi8vZ2l0aHViLmNvbS9ITUNUUy9hbS1vcmctcm9sZS1tYXBwaW5nLXNlcnZpY2UuZ2l0IiwiYnVzaW5lc3NBcmVhIjoiQ0ZUIiwiY29udGFjdFNsYWNrQ2hhbm5lbCI6IiNhbS1tYXN0ZXItYnVpbGRzIiwiZW52aXJvbm1lbnQiOiJzdGFnaW5nIiwibWFuYWdlZEJ5IjoiQU0ifQ=="
}
+ customEmailSubject = {
+ value = "Alert: PRM Process 2 - Find Organisations with Stale Profiles failed in am-aat"
}
+ frequencyInMinutes = {
+ value = "15"
}
+ location = {
+ value = "UK South"
}
+ severityLevel = {
+ value = "2"
}
+ timeWindowInMinutes = {
+ value = "10080"
}
+ triggerThreshold = {
+ value = "0"
}
+ triggerThresholdOperator = {
+ value = "GreaterThan"
}
}
)
+ resource_group_name = "am-shared-infrastructure-aat"
+ template_content = jsonencode(
{
+ "$schema" = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
+ contentVersion = "1.0.0.0"
+ parameters = {
+ actionGroupName = {
+ type = "string"
}
+ actionGroupRg = {
+ type = "string"
}
+ alertDesc = {
+ type = "string"
}
+ alertName = {
+ type = "string"
}
+ appInsightsName = {
+ type = "string"
}
+ appInsightsQuery = {
+ type = "string"
}
+ commonTags = {
+ type = "string"
}
+ customEmailSubject = {
+ type = "string"
}
+ frequencyInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ location = {
+ type = "string"
}
+ severityLevel = {
+ defaultValue = "3"
+ type = "string"
}
+ timeWindowInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ triggerThreshold = {
+ type = "string"
}
+ triggerThresholdOperator = {
+ allowedValues = [
+ "GreaterThan",
+ "Equal",
+ "LessThan",
]
+ defaultValue = "GreaterThan"
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-09-01-preview"
+ location = "[parameters('location')]"
+ name = "[parameters('alertName')]"
+ properties = {
+ action = {
+ aznsAction = {
+ actionGroup = [
+ "[resourceId(parameters('actionGroupRg'), 'microsoft.insights/actionGroups', parameters('actionGroupName'))]",
]
+ emailSubject = "[parameters('customEmailSubject')]"
}
+ "odata.type" = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"
+ severity = "[parameters('severityLevel')]"
+ status = "Active"
+ trigger = {
+ consecutiveBreach = 1
+ threshold = "[parameters('triggerThreshold')]"
+ thresholdOperator = "[parameters('triggerThresholdOperator')]"
}
}
+ description = "[parameters('alertDesc')]"
+ enabled = "true"
+ schedule = {
+ frequencyInMinutes = "[parameters('frequencyInMinutes')]"
+ timeWindowInMinutes = "[parameters('timeWindowInMinutes')]"
}
+ skuType = "L1"
+ source = {
+ dataSourceId = "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]"
+ query = "[parameters('appInsightsQuery')]"
+ queryType = "ResultCount"
}
}
+ tags = "[union(variables('tags'), variables('additionalTags'))]"
+ type = "microsoft.insights/scheduledqueryrules"
},
]
+ variables = {
+ additionalTags = {
+ "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]" = "Resource"
}
+ tags = "[base64ToJson(parameters('commonTags'))]"
}
}
)
}
# module.prm-process-failure-alerts["prm-process-3"].azurerm_resource_group_template_deployment.custom_alert[0] will be created
+ resource "azurerm_resource_group_template_deployment" "custom_alert" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-process-3-failure-alert"
+ output_content = (known after apply)
+ parameters_content = jsonencode(
{
+ actionGroupName = {
+ value = "am-prm-support"
}
+ actionGroupRg = {
+ value = "am-shared-infrastructure-aat"
}
+ alertDesc = {
+ value = "Triggers when PRM Process 3 - Find organisation changes fails am-aat."
}
+ alertName = {
+ value = "am-prm-process-3-failure-alert"
}
+ appInsightsName = {
+ value = "am-aat"
}
+ appInsightsQuery = {
+ value = "customEvents | where name == 'PRM Process 3 - Find organisation changes - Failed'"
}
+ commonTags = {
+ value = "eyJhcHBsaWNhdGlvbiI6ImFjY2Vzcy1tYW5hZ2VtZW50IiwiYXV0b1NodXRkb3duIjoidHJ1ZSIsImJ1aWx0RnJvbSI6Imh0dHBzOi8vZ2l0aHViLmNvbS9ITUNUUy9hbS1vcmctcm9sZS1tYXBwaW5nLXNlcnZpY2UuZ2l0IiwiYnVzaW5lc3NBcmVhIjoiQ0ZUIiwiY29udGFjdFNsYWNrQ2hhbm5lbCI6IiNhbS1tYXN0ZXItYnVpbGRzIiwiZW52aXJvbm1lbnQiOiJzdGFnaW5nIiwibWFuYWdlZEJ5IjoiQU0ifQ=="
}
+ customEmailSubject = {
+ value = "Alert: PRM Process 3 - Find organisation changes failed in am-aat"
}
+ frequencyInMinutes = {
+ value = "15"
}
+ location = {
# ...
# ... The maximum length of GitHub Comment is 65536, so the content is omitted by tfcmt.
# ...
}
+ actionGroupRg = {
+ type = "string"
}
+ alertDesc = {
+ type = "string"
}
+ alertName = {
+ type = "string"
}
+ appInsightsName = {
+ type = "string"
}
+ appInsightsQuery = {
+ type = "string"
}
+ commonTags = {
+ type = "string"
}
+ customEmailSubject = {
+ type = "string"
}
+ frequencyInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ location = {
+ type = "string"
}
+ severityLevel = {
+ defaultValue = "3"
+ type = "string"
}
+ timeWindowInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ triggerThreshold = {
+ type = "string"
}
+ triggerThresholdOperator = {
+ allowedValues = [
+ "GreaterThan",
+ "Equal",
+ "LessThan",
]
+ defaultValue = "GreaterThan"
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-09-01-preview"
+ location = "[parameters('location')]"
+ name = "[parameters('alertName')]"
+ properties = {
+ action = {
+ aznsAction = {
+ actionGroup = [
+ "[resourceId(parameters('actionGroupRg'), 'microsoft.insights/actionGroups', parameters('actionGroupName'))]",
]
+ emailSubject = "[parameters('customEmailSubject')]"
}
+ "odata.type" = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"
+ severity = "[parameters('severityLevel')]"
+ status = "Active"
+ trigger = {
+ consecutiveBreach = 1
+ threshold = "[parameters('triggerThreshold')]"
+ thresholdOperator = "[parameters('triggerThresholdOperator')]"
}
}
+ description = "[parameters('alertDesc')]"
+ enabled = "true"
+ schedule = {
+ frequencyInMinutes = "[parameters('frequencyInMinutes')]"
+ timeWindowInMinutes = "[parameters('timeWindowInMinutes')]"
}
+ skuType = "L1"
+ source = {
+ dataSourceId = "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]"
+ query = "[parameters('appInsightsQuery')]"
+ queryType = "ResultCount"
}
}
+ tags = "[union(variables('tags'), variables('additionalTags'))]"
+ type = "microsoft.insights/scheduledqueryrules"
},
]
+ variables = {
+ additionalTags = {
+ "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]" = "Resource"
}
+ tags = "[base64ToJson(parameters('commonTags'))]"
}
}
)
}
# module.prm-process-not-started-alerts["prm-process-5"].azurerm_resource_group_template_deployment.custom_alert[0] will be created
+ resource "azurerm_resource_group_template_deployment" "custom_alert" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-process-5-not-started-alert"
+ output_content = (known after apply)
+ parameters_content = jsonencode(
{
+ actionGroupName = {
+ value = "am-prm-support"
}
+ actionGroupRg = {
+ value = "am-shared-infrastructure-aat"
}
+ alertDesc = {
+ value = "Triggers when PRM Process 5 - Find User Changes has not started the expected time frame in am-aat."
}
+ alertName = {
+ value = "am-prm-process-5-not-started-alert"
}
+ appInsightsName = {
+ value = "am-aat"
}
+ appInsightsQuery = {
+ value = "customEvents | where name == 'PRM Process 5 - Find User Changes - Started' | limit 1"
}
+ commonTags = {
+ value = "eyJhcHBsaWNhdGlvbiI6ImFjY2Vzcy1tYW5hZ2VtZW50IiwiYXV0b1NodXRkb3duIjoidHJ1ZSIsImJ1aWx0RnJvbSI6Imh0dHBzOi8vZ2l0aHViLmNvbS9ITUNUUy9hbS1vcmctcm9sZS1tYXBwaW5nLXNlcnZpY2UuZ2l0IiwiYnVzaW5lc3NBcmVhIjoiQ0ZUIiwiY29udGFjdFNsYWNrQ2hhbm5lbCI6IiNhbS1tYXN0ZXItYnVpbGRzIiwiZW52aXJvbm1lbnQiOiJzdGFnaW5nIiwibWFuYWdlZEJ5IjoiQU0ifQ=="
}
+ customEmailSubject = {
+ value = "Alert: PRM Process 5 - Find User Changes has not started in expected time frame in am-aat"
}
+ frequencyInMinutes = {
+ value = "15"
}
+ location = {
+ value = "UK South"
}
+ severityLevel = {
+ value = "2"
}
+ timeWindowInMinutes = {
+ value = "10080"
}
+ triggerThreshold = {
+ value = "1"
}
+ triggerThresholdOperator = {
+ value = "LessThan"
}
}
)
+ resource_group_name = "am-shared-infrastructure-aat"
+ template_content = jsonencode(
{
+ "$schema" = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
+ contentVersion = "1.0.0.0"
+ parameters = {
+ actionGroupName = {
+ type = "string"
}
+ actionGroupRg = {
+ type = "string"
}
+ alertDesc = {
+ type = "string"
}
+ alertName = {
+ type = "string"
}
+ appInsightsName = {
+ type = "string"
}
+ appInsightsQuery = {
+ type = "string"
}
+ commonTags = {
+ type = "string"
}
+ customEmailSubject = {
+ type = "string"
}
+ frequencyInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ location = {
+ type = "string"
}
+ severityLevel = {
+ defaultValue = "3"
+ type = "string"
}
+ timeWindowInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ triggerThreshold = {
+ type = "string"
}
+ triggerThresholdOperator = {
+ allowedValues = [
+ "GreaterThan",
+ "Equal",
+ "LessThan",
]
+ defaultValue = "GreaterThan"
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-09-01-preview"
+ location = "[parameters('location')]"
+ name = "[parameters('alertName')]"
+ properties = {
+ action = {
+ aznsAction = {
+ actionGroup = [
+ "[resourceId(parameters('actionGroupRg'), 'microsoft.insights/actionGroups', parameters('actionGroupName'))]",
]
+ emailSubject = "[parameters('customEmailSubject')]"
}
+ "odata.type" = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"
+ severity = "[parameters('severityLevel')]"
+ status = "Active"
+ trigger = {
+ consecutiveBreach = 1
+ threshold = "[parameters('triggerThreshold')]"
+ thresholdOperator = "[parameters('triggerThresholdOperator')]"
}
}
+ description = "[parameters('alertDesc')]"
+ enabled = "true"
+ schedule = {
+ frequencyInMinutes = "[parameters('frequencyInMinutes')]"
+ timeWindowInMinutes = "[parameters('timeWindowInMinutes')]"
}
+ skuType = "L1"
+ source = {
+ dataSourceId = "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]"
+ query = "[parameters('appInsightsQuery')]"
+ queryType = "ResultCount"
}
}
+ tags = "[union(variables('tags'), variables('additionalTags'))]"
+ type = "microsoft.insights/scheduledqueryrules"
},
]
+ variables = {
+ additionalTags = {
+ "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]" = "Resource"
}
+ tags = "[base64ToJson(parameters('commonTags'))]"
}
}
)
}
# module.prm-process-not-started-alerts["prm-process-6"].azurerm_resource_group_template_deployment.custom_alert[0] will be created
+ resource "azurerm_resource_group_template_deployment" "custom_alert" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-process-6-not-started-alert"
+ output_content = (known after apply)
+ parameters_content = jsonencode(
{
+ actionGroupName = {
+ value = "am-prm-support"
}
+ actionGroupRg = {
+ value = "am-shared-infrastructure-aat"
}
+ alertDesc = {
+ value = "Triggers when PRM Process 6 - Refresh - Single User Mode and new PRM endpoint has not started the expected time frame in am-aat."
}
+ alertName = {
+ value = "am-prm-process-6-not-started-alert"
}
+ appInsightsName = {
+ value = "am-aat"
}
+ appInsightsQuery = {
+ value = "customEvents | where name == 'PRM Process 6 - Refresh - Single User Mode and new PRM endpoint - Started' | limit 1"
}
+ commonTags = {
+ value = "eyJhcHBsaWNhdGlvbiI6ImFjY2Vzcy1tYW5hZ2VtZW50IiwiYXV0b1NodXRkb3duIjoidHJ1ZSIsImJ1aWx0RnJvbSI6Imh0dHBzOi8vZ2l0aHViLmNvbS9ITUNUUy9hbS1vcmctcm9sZS1tYXBwaW5nLXNlcnZpY2UuZ2l0IiwiYnVzaW5lc3NBcmVhIjoiQ0ZUIiwiY29udGFjdFNsYWNrQ2hhbm5lbCI6IiNhbS1tYXN0ZXItYnVpbGRzIiwiZW52aXJvbm1lbnQiOiJzdGFnaW5nIiwibWFuYWdlZEJ5IjoiQU0ifQ=="
}
+ customEmailSubject = {
+ value = "Alert: PRM Process 6 - Refresh - Single User Mode and new PRM endpoint has not started in expected time frame in am-aat"
}
+ frequencyInMinutes = {
+ value = "15"
}
+ location = {
+ value = "UK South"
}
+ severityLevel = {
+ value = "2"
}
+ timeWindowInMinutes = {
+ value = "10080"
}
+ triggerThreshold = {
+ value = "1"
}
+ triggerThresholdOperator = {
+ value = "LessThan"
}
}
)
+ resource_group_name = "am-shared-infrastructure-aat"
+ template_content = jsonencode(
{
+ "$schema" = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
+ contentVersion = "1.0.0.0"
+ parameters = {
+ actionGroupName = {
+ type = "string"
}
+ actionGroupRg = {
+ type = "string"
}
+ alertDesc = {
+ type = "string"
}
+ alertName = {
+ type = "string"
}
+ appInsightsName = {
+ type = "string"
}
+ appInsightsQuery = {
+ type = "string"
}
+ commonTags = {
+ type = "string"
}
+ customEmailSubject = {
+ type = "string"
}
+ frequencyInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ location = {
+ type = "string"
}
+ severityLevel = {
+ defaultValue = "3"
+ type = "string"
}
+ timeWindowInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ triggerThreshold = {
+ type = "string"
}
+ triggerThresholdOperator = {
+ allowedValues = [
+ "GreaterThan",
+ "Equal",
+ "LessThan",
]
+ defaultValue = "GreaterThan"
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-09-01-preview"
+ location = "[parameters('location')]"
+ name = "[parameters('alertName')]"
+ properties = {
+ action = {
+ aznsAction = {
+ actionGroup = [
+ "[resourceId(parameters('actionGroupRg'), 'microsoft.insights/actionGroups', parameters('actionGroupName'))]",
]
+ emailSubject = "[parameters('customEmailSubject')]"
}
+ "odata.type" = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"
+ severity = "[parameters('severityLevel')]"
+ status = "Active"
+ trigger = {
+ consecutiveBreach = 1
+ threshold = "[parameters('triggerThreshold')]"
+ thresholdOperator = "[parameters('triggerThresholdOperator')]"
}
}
+ description = "[parameters('alertDesc')]"
+ enabled = "true"
+ schedule = {
+ frequencyInMinutes = "[parameters('frequencyInMinutes')]"
+ timeWindowInMinutes = "[parameters('timeWindowInMinutes')]"
}
+ skuType = "L1"
+ source = {
+ dataSourceId = "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]"
+ query = "[parameters('appInsightsQuery')]"
+ queryType = "ResultCount"
}
}
+ tags = "[union(variables('tags'), variables('additionalTags'))]"
+ type = "microsoft.insights/scheduledqueryrules"
},
]
+ variables = {
+ additionalTags = {
+ "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]" = "Resource"
}
+ tags = "[base64ToJson(parameters('commonTags'))]"
}
}
)
}
Plan: 19 to add, 0 to change, 0 to destroy. |
Plan Result (prod)
Change Result (Click me) # module.am-prm-action-group.azurerm_resource_group_template_deployment.action-group will be created
+ resource "azurerm_resource_group_template_deployment" "action-group" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-support"
+ output_content = (known after apply)
+ parameters_content = (sensitive value)
+ resource_group_name = "am-shared-infrastructure-prod"
+ template_content = jsonencode(
{
+ "$schema" = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
+ contentVersion = "1.0.0.0"
+ outputs = {
+ actionGroupId = {
+ type = "string"
+ value = "[resourceId('microsoft.insights/actionGroups', parameters('actionGroupName'))]"
}
}
+ parameters = {
+ actionGroupName = {
+ type = "string"
}
+ emailReceiverAddress = {
+ metadata = {
+ description = "Email address of the receiver"
}
+ type = "string"
}
+ emailReceiverName = {
+ metadata = {
+ description = "Name of the email receiver"
}
+ type = "string"
}
+ location = {
+ defaultValue = "global"
+ type = "string"
}
+ shortName = {
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-04-01"
+ location = "[parameters('location')]"
+ name = "[parameters('actionGroupName')]"
+ properties = {
+ emailReceivers = [
+ {
+ emailAddress = "[parameters('emailReceiverAddress')]"
+ name = "[parameters('emailReceiverName')]"
},
]
+ enabled = true
+ groupShortName = "[parameters('shortName')]"
+ smsReceivers = []
+ webhookReceivers = []
}
+ tags = {}
+ type = "microsoft.insights/actionGroups"
},
]
}
)
}
# module.prm-process-failure-alerts["prm-process-1"].azurerm_resource_group_template_deployment.custom_alert[0] will be created
+ resource "azurerm_resource_group_template_deployment" "custom_alert" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-process-1-failure-alert"
+ output_content = (known after apply)
+ parameters_content = jsonencode(
{
+ actionGroupName = {
+ value = "am-prm-support"
}
+ actionGroupRg = {
+ value = "am-shared-infrastructure-prod"
}
+ alertDesc = {
+ value = "Triggers when PRM Process 1 - Find Case Definition Changes fails am-prod."
}
+ alertName = {
+ value = "am-prm-process-1-failure-alert"
}
+ appInsightsName = {
+ value = "am-prod"
}
+ appInsightsQuery = {
+ value = "customEvents | where name == 'PRM Process 1 - Find Case Definition Changes - Failed'"
}
+ commonTags = {
+ value = "eyJhcHBsaWNhdGlvbiI6ImFjY2Vzcy1tYW5hZ2VtZW50IiwiYnVpbHRGcm9tIjoiaHR0cHM6Ly9naXRodWIuY29tL0hNQ1RTL2FtLW9yZy1yb2xlLW1hcHBpbmctc2VydmljZS5naXQiLCJidXNpbmVzc0FyZWEiOiJDRlQiLCJjb250YWN0U2xhY2tDaGFubmVsIjoiI2FtLW1hc3Rlci1idWlsZHMiLCJlbnZpcm9ubWVudCI6InByb2R1Y3Rpb24iLCJtYW5hZ2VkQnkiOiJBTSJ9"
}
+ customEmailSubject = {
+ value = "Alert: PRM Process 1 - Find Case Definition Changes failed in am-prod"
}
+ frequencyInMinutes = {
+ value = "15"
}
+ location = {
+ value = "UK South"
}
+ severityLevel = {
+ value = "2"
}
+ timeWindowInMinutes = {
+ value = "10080"
}
+ triggerThreshold = {
+ value = "0"
}
+ triggerThresholdOperator = {
+ value = "GreaterThan"
}
}
)
+ resource_group_name = "am-shared-infrastructure-prod"
+ template_content = jsonencode(
{
+ "$schema" = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
+ contentVersion = "1.0.0.0"
+ parameters = {
+ actionGroupName = {
+ type = "string"
}
+ actionGroupRg = {
+ type = "string"
}
+ alertDesc = {
+ type = "string"
}
+ alertName = {
+ type = "string"
}
+ appInsightsName = {
+ type = "string"
}
+ appInsightsQuery = {
+ type = "string"
}
+ commonTags = {
+ type = "string"
}
+ customEmailSubject = {
+ type = "string"
}
+ frequencyInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ location = {
+ type = "string"
}
+ severityLevel = {
+ defaultValue = "3"
+ type = "string"
}
+ timeWindowInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ triggerThreshold = {
+ type = "string"
}
+ triggerThresholdOperator = {
+ allowedValues = [
+ "GreaterThan",
+ "Equal",
+ "LessThan",
]
+ defaultValue = "GreaterThan"
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-09-01-preview"
+ location = "[parameters('location')]"
+ name = "[parameters('alertName')]"
+ properties = {
+ action = {
+ aznsAction = {
+ actionGroup = [
+ "[resourceId(parameters('actionGroupRg'), 'microsoft.insights/actionGroups', parameters('actionGroupName'))]",
]
+ emailSubject = "[parameters('customEmailSubject')]"
}
+ "odata.type" = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"
+ severity = "[parameters('severityLevel')]"
+ status = "Active"
+ trigger = {
+ consecutiveBreach = 1
+ threshold = "[parameters('triggerThreshold')]"
+ thresholdOperator = "[parameters('triggerThresholdOperator')]"
}
}
+ description = "[parameters('alertDesc')]"
+ enabled = "true"
+ schedule = {
+ frequencyInMinutes = "[parameters('frequencyInMinutes')]"
+ timeWindowInMinutes = "[parameters('timeWindowInMinutes')]"
}
+ skuType = "L1"
+ source = {
+ dataSourceId = "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]"
+ query = "[parameters('appInsightsQuery')]"
+ queryType = "ResultCount"
}
}
+ tags = "[union(variables('tags'), variables('additionalTags'))]"
+ type = "microsoft.insights/scheduledqueryrules"
},
]
+ variables = {
+ additionalTags = {
+ "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]" = "Resource"
}
+ tags = "[base64ToJson(parameters('commonTags'))]"
}
}
)
}
# module.prm-process-failure-alerts["prm-process-2"].azurerm_resource_group_template_deployment.custom_alert[0] will be created
+ resource "azurerm_resource_group_template_deployment" "custom_alert" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-process-2-failure-alert"
+ output_content = (known after apply)
+ parameters_content = jsonencode(
{
+ actionGroupName = {
+ value = "am-prm-support"
}
+ actionGroupRg = {
+ value = "am-shared-infrastructure-prod"
}
+ alertDesc = {
+ value = "Triggers when PRM Process 2 - Find Organisations with Stale Profiles fails am-prod."
}
+ alertName = {
+ value = "am-prm-process-2-failure-alert"
}
+ appInsightsName = {
+ value = "am-prod"
}
+ appInsightsQuery = {
+ value = "customEvents | where name == 'PRM Process 2 - Find Organisations with Stale Profiles - Failed'"
}
+ commonTags = {
+ value = "eyJhcHBsaWNhdGlvbiI6ImFjY2Vzcy1tYW5hZ2VtZW50IiwiYnVpbHRGcm9tIjoiaHR0cHM6Ly9naXRodWIuY29tL0hNQ1RTL2FtLW9yZy1yb2xlLW1hcHBpbmctc2VydmljZS5naXQiLCJidXNpbmVzc0FyZWEiOiJDRlQiLCJjb250YWN0U2xhY2tDaGFubmVsIjoiI2FtLW1hc3Rlci1idWlsZHMiLCJlbnZpcm9ubWVudCI6InByb2R1Y3Rpb24iLCJtYW5hZ2VkQnkiOiJBTSJ9"
}
+ customEmailSubject = {
+ value = "Alert: PRM Process 2 - Find Organisations with Stale Profiles failed in am-prod"
}
+ frequencyInMinutes = {
+ value = "15"
}
+ location = {
+ value = "UK South"
}
+ severityLevel = {
+ value = "2"
}
+ timeWindowInMinutes = {
+ value = "10080"
}
+ triggerThreshold = {
+ value = "0"
}
+ triggerThresholdOperator = {
+ value = "GreaterThan"
}
}
)
+ resource_group_name = "am-shared-infrastructure-prod"
+ template_content = jsonencode(
{
+ "$schema" = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
+ contentVersion = "1.0.0.0"
+ parameters = {
+ actionGroupName = {
+ type = "string"
}
+ actionGroupRg = {
+ type = "string"
}
+ alertDesc = {
+ type = "string"
}
+ alertName = {
+ type = "string"
}
+ appInsightsName = {
+ type = "string"
}
+ appInsightsQuery = {
+ type = "string"
}
+ commonTags = {
+ type = "string"
}
+ customEmailSubject = {
+ type = "string"
}
+ frequencyInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ location = {
+ type = "string"
}
+ severityLevel = {
+ defaultValue = "3"
+ type = "string"
}
+ timeWindowInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ triggerThreshold = {
+ type = "string"
}
+ triggerThresholdOperator = {
+ allowedValues = [
+ "GreaterThan",
+ "Equal",
+ "LessThan",
]
+ defaultValue = "GreaterThan"
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-09-01-preview"
+ location = "[parameters('location')]"
+ name = "[parameters('alertName')]"
+ properties = {
+ action = {
+ aznsAction = {
+ actionGroup = [
+ "[resourceId(parameters('actionGroupRg'), 'microsoft.insights/actionGroups', parameters('actionGroupName'))]",
]
+ emailSubject = "[parameters('customEmailSubject')]"
}
+ "odata.type" = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"
+ severity = "[parameters('severityLevel')]"
+ status = "Active"
+ trigger = {
+ consecutiveBreach = 1
+ threshold = "[parameters('triggerThreshold')]"
+ thresholdOperator = "[parameters('triggerThresholdOperator')]"
}
}
+ description = "[parameters('alertDesc')]"
+ enabled = "true"
+ schedule = {
+ frequencyInMinutes = "[parameters('frequencyInMinutes')]"
+ timeWindowInMinutes = "[parameters('timeWindowInMinutes')]"
}
+ skuType = "L1"
+ source = {
+ dataSourceId = "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]"
+ query = "[parameters('appInsightsQuery')]"
+ queryType = "ResultCount"
}
}
+ tags = "[union(variables('tags'), variables('additionalTags'))]"
+ type = "microsoft.insights/scheduledqueryrules"
},
]
+ variables = {
+ additionalTags = {
+ "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]" = "Resource"
}
+ tags = "[base64ToJson(parameters('commonTags'))]"
}
}
)
}
# module.prm-process-failure-alerts["prm-process-3"].azurerm_resource_group_template_deployment.custom_alert[0] will be created
+ resource "azurerm_resource_group_template_deployment" "custom_alert" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-process-3-failure-alert"
+ output_content = (known after apply)
+ parameters_content = jsonencode(
{
+ actionGroupName = {
+ value = "am-prm-support"
}
+ actionGroupRg = {
+ value = "am-shared-infrastructure-prod"
}
+ alertDesc = {
+ value = "Triggers when PRM Process 3 - Find organisation changes fails am-prod."
}
+ alertName = {
+ value = "am-prm-process-3-failure-alert"
}
+ appInsightsName = {
+ value = "am-prod"
}
+ appInsightsQuery = {
+ value = "customEvents | where name == 'PRM Process 3 - Find organisation changes - Failed'"
}
+ commonTags = {
+ value = "eyJhcHBsaWNhdGlvbiI6ImFjY2Vzcy1tYW5hZ2VtZW50IiwiYnVpbHRGcm9tIjoiaHR0cHM6Ly9naXRodWIuY29tL0hNQ1RTL2FtLW9yZy1yb2xlLW1hcHBpbmctc2VydmljZS5naXQiLCJidXNpbmVzc0FyZWEiOiJDRlQiLCJjb250YWN0U2xhY2tDaGFubmVsIjoiI2FtLW1hc3Rlci1idWlsZHMiLCJlbnZpcm9ubWVudCI6InByb2R1Y3Rpb24iLCJtYW5hZ2VkQnkiOiJBTSJ9"
}
+ customEmailSubject = {
+ value = "Alert: PRM Process 3 - Find organisation changes failed in am-prod"
}
+ frequencyInMinutes = {
+ value = "15"
}
+ location = {
+ value = "UK South"
}
+
# ...
# ... The maximum length of GitHub Comment is 65536, so the content is omitted by tfcmt.
# ...
+ type = "string"
}
+ actionGroupRg = {
+ type = "string"
}
+ alertDesc = {
+ type = "string"
}
+ alertName = {
+ type = "string"
}
+ appInsightsName = {
+ type = "string"
}
+ appInsightsQuery = {
+ type = "string"
}
+ commonTags = {
+ type = "string"
}
+ customEmailSubject = {
+ type = "string"
}
+ frequencyInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ location = {
+ type = "string"
}
+ severityLevel = {
+ defaultValue = "3"
+ type = "string"
}
+ timeWindowInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ triggerThreshold = {
+ type = "string"
}
+ triggerThresholdOperator = {
+ allowedValues = [
+ "GreaterThan",
+ "Equal",
+ "LessThan",
]
+ defaultValue = "GreaterThan"
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-09-01-preview"
+ location = "[parameters('location')]"
+ name = "[parameters('alertName')]"
+ properties = {
+ action = {
+ aznsAction = {
+ actionGroup = [
+ "[resourceId(parameters('actionGroupRg'), 'microsoft.insights/actionGroups', parameters('actionGroupName'))]",
]
+ emailSubject = "[parameters('customEmailSubject')]"
}
+ "odata.type" = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"
+ severity = "[parameters('severityLevel')]"
+ status = "Active"
+ trigger = {
+ consecutiveBreach = 1
+ threshold = "[parameters('triggerThreshold')]"
+ thresholdOperator = "[parameters('triggerThresholdOperator')]"
}
}
+ description = "[parameters('alertDesc')]"
+ enabled = "true"
+ schedule = {
+ frequencyInMinutes = "[parameters('frequencyInMinutes')]"
+ timeWindowInMinutes = "[parameters('timeWindowInMinutes')]"
}
+ skuType = "L1"
+ source = {
+ dataSourceId = "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]"
+ query = "[parameters('appInsightsQuery')]"
+ queryType = "ResultCount"
}
}
+ tags = "[union(variables('tags'), variables('additionalTags'))]"
+ type = "microsoft.insights/scheduledqueryrules"
},
]
+ variables = {
+ additionalTags = {
+ "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]" = "Resource"
}
+ tags = "[base64ToJson(parameters('commonTags'))]"
}
}
)
}
# module.prm-process-not-started-alerts["prm-process-5"].azurerm_resource_group_template_deployment.custom_alert[0] will be created
+ resource "azurerm_resource_group_template_deployment" "custom_alert" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-process-5-not-started-alert"
+ output_content = (known after apply)
+ parameters_content = jsonencode(
{
+ actionGroupName = {
+ value = "am-prm-support"
}
+ actionGroupRg = {
+ value = "am-shared-infrastructure-prod"
}
+ alertDesc = {
+ value = "Triggers when PRM Process 5 - Find User Changes has not started the expected time frame in am-prod."
}
+ alertName = {
+ value = "am-prm-process-5-not-started-alert"
}
+ appInsightsName = {
+ value = "am-prod"
}
+ appInsightsQuery = {
+ value = "customEvents | where name == 'PRM Process 5 - Find User Changes - Started' | limit 1"
}
+ commonTags = {
+ value = "eyJhcHBsaWNhdGlvbiI6ImFjY2Vzcy1tYW5hZ2VtZW50IiwiYnVpbHRGcm9tIjoiaHR0cHM6Ly9naXRodWIuY29tL0hNQ1RTL2FtLW9yZy1yb2xlLW1hcHBpbmctc2VydmljZS5naXQiLCJidXNpbmVzc0FyZWEiOiJDRlQiLCJjb250YWN0U2xhY2tDaGFubmVsIjoiI2FtLW1hc3Rlci1idWlsZHMiLCJlbnZpcm9ubWVudCI6InByb2R1Y3Rpb24iLCJtYW5hZ2VkQnkiOiJBTSJ9"
}
+ customEmailSubject = {
+ value = "Alert: PRM Process 5 - Find User Changes has not started in expected time frame in am-prod"
}
+ frequencyInMinutes = {
+ value = "15"
}
+ location = {
+ value = "UK South"
}
+ severityLevel = {
+ value = "2"
}
+ timeWindowInMinutes = {
+ value = "10080"
}
+ triggerThreshold = {
+ value = "1"
}
+ triggerThresholdOperator = {
+ value = "LessThan"
}
}
)
+ resource_group_name = "am-shared-infrastructure-prod"
+ template_content = jsonencode(
{
+ "$schema" = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
+ contentVersion = "1.0.0.0"
+ parameters = {
+ actionGroupName = {
+ type = "string"
}
+ actionGroupRg = {
+ type = "string"
}
+ alertDesc = {
+ type = "string"
}
+ alertName = {
+ type = "string"
}
+ appInsightsName = {
+ type = "string"
}
+ appInsightsQuery = {
+ type = "string"
}
+ commonTags = {
+ type = "string"
}
+ customEmailSubject = {
+ type = "string"
}
+ frequencyInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ location = {
+ type = "string"
}
+ severityLevel = {
+ defaultValue = "3"
+ type = "string"
}
+ timeWindowInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ triggerThreshold = {
+ type = "string"
}
+ triggerThresholdOperator = {
+ allowedValues = [
+ "GreaterThan",
+ "Equal",
+ "LessThan",
]
+ defaultValue = "GreaterThan"
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-09-01-preview"
+ location = "[parameters('location')]"
+ name = "[parameters('alertName')]"
+ properties = {
+ action = {
+ aznsAction = {
+ actionGroup = [
+ "[resourceId(parameters('actionGroupRg'), 'microsoft.insights/actionGroups', parameters('actionGroupName'))]",
]
+ emailSubject = "[parameters('customEmailSubject')]"
}
+ "odata.type" = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"
+ severity = "[parameters('severityLevel')]"
+ status = "Active"
+ trigger = {
+ consecutiveBreach = 1
+ threshold = "[parameters('triggerThreshold')]"
+ thresholdOperator = "[parameters('triggerThresholdOperator')]"
}
}
+ description = "[parameters('alertDesc')]"
+ enabled = "true"
+ schedule = {
+ frequencyInMinutes = "[parameters('frequencyInMinutes')]"
+ timeWindowInMinutes = "[parameters('timeWindowInMinutes')]"
}
+ skuType = "L1"
+ source = {
+ dataSourceId = "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]"
+ query = "[parameters('appInsightsQuery')]"
+ queryType = "ResultCount"
}
}
+ tags = "[union(variables('tags'), variables('additionalTags'))]"
+ type = "microsoft.insights/scheduledqueryrules"
},
]
+ variables = {
+ additionalTags = {
+ "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]" = "Resource"
}
+ tags = "[base64ToJson(parameters('commonTags'))]"
}
}
)
}
# module.prm-process-not-started-alerts["prm-process-6"].azurerm_resource_group_template_deployment.custom_alert[0] will be created
+ resource "azurerm_resource_group_template_deployment" "custom_alert" {
+ deployment_mode = "Incremental"
+ id = (known after apply)
+ name = "am-prm-process-6-not-started-alert"
+ output_content = (known after apply)
+ parameters_content = jsonencode(
{
+ actionGroupName = {
+ value = "am-prm-support"
}
+ actionGroupRg = {
+ value = "am-shared-infrastructure-prod"
}
+ alertDesc = {
+ value = "Triggers when PRM Process 6 - Refresh - Single User Mode and new PRM endpoint has not started the expected time frame in am-prod."
}
+ alertName = {
+ value = "am-prm-process-6-not-started-alert"
}
+ appInsightsName = {
+ value = "am-prod"
}
+ appInsightsQuery = {
+ value = "customEvents | where name == 'PRM Process 6 - Refresh - Single User Mode and new PRM endpoint - Started' | limit 1"
}
+ commonTags = {
+ value = "eyJhcHBsaWNhdGlvbiI6ImFjY2Vzcy1tYW5hZ2VtZW50IiwiYnVpbHRGcm9tIjoiaHR0cHM6Ly9naXRodWIuY29tL0hNQ1RTL2FtLW9yZy1yb2xlLW1hcHBpbmctc2VydmljZS5naXQiLCJidXNpbmVzc0FyZWEiOiJDRlQiLCJjb250YWN0U2xhY2tDaGFubmVsIjoiI2FtLW1hc3Rlci1idWlsZHMiLCJlbnZpcm9ubWVudCI6InByb2R1Y3Rpb24iLCJtYW5hZ2VkQnkiOiJBTSJ9"
}
+ customEmailSubject = {
+ value = "Alert: PRM Process 6 - Refresh - Single User Mode and new PRM endpoint has not started in expected time frame in am-prod"
}
+ frequencyInMinutes = {
+ value = "15"
}
+ location = {
+ value = "UK South"
}
+ severityLevel = {
+ value = "2"
}
+ timeWindowInMinutes = {
+ value = "10080"
}
+ triggerThreshold = {
+ value = "1"
}
+ triggerThresholdOperator = {
+ value = "LessThan"
}
}
)
+ resource_group_name = "am-shared-infrastructure-prod"
+ template_content = jsonencode(
{
+ "$schema" = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
+ contentVersion = "1.0.0.0"
+ parameters = {
+ actionGroupName = {
+ type = "string"
}
+ actionGroupRg = {
+ type = "string"
}
+ alertDesc = {
+ type = "string"
}
+ alertName = {
+ type = "string"
}
+ appInsightsName = {
+ type = "string"
}
+ appInsightsQuery = {
+ type = "string"
}
+ commonTags = {
+ type = "string"
}
+ customEmailSubject = {
+ type = "string"
}
+ frequencyInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ location = {
+ type = "string"
}
+ severityLevel = {
+ defaultValue = "3"
+ type = "string"
}
+ timeWindowInMinutes = {
+ defaultValue = "5"
+ type = "string"
}
+ triggerThreshold = {
+ type = "string"
}
+ triggerThresholdOperator = {
+ allowedValues = [
+ "GreaterThan",
+ "Equal",
+ "LessThan",
]
+ defaultValue = "GreaterThan"
+ type = "string"
}
}
+ resources = [
+ {
+ apiVersion = "2017-09-01-preview"
+ location = "[parameters('location')]"
+ name = "[parameters('alertName')]"
+ properties = {
+ action = {
+ aznsAction = {
+ actionGroup = [
+ "[resourceId(parameters('actionGroupRg'), 'microsoft.insights/actionGroups', parameters('actionGroupName'))]",
]
+ emailSubject = "[parameters('customEmailSubject')]"
}
+ "odata.type" = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"
+ severity = "[parameters('severityLevel')]"
+ status = "Active"
+ trigger = {
+ consecutiveBreach = 1
+ threshold = "[parameters('triggerThreshold')]"
+ thresholdOperator = "[parameters('triggerThresholdOperator')]"
}
}
+ description = "[parameters('alertDesc')]"
+ enabled = "true"
+ schedule = {
+ frequencyInMinutes = "[parameters('frequencyInMinutes')]"
+ timeWindowInMinutes = "[parameters('timeWindowInMinutes')]"
}
+ skuType = "L1"
+ source = {
+ dataSourceId = "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]"
+ query = "[parameters('appInsightsQuery')]"
+ queryType = "ResultCount"
}
}
+ tags = "[union(variables('tags'), variables('additionalTags'))]"
+ type = "microsoft.insights/scheduledqueryrules"
},
]
+ variables = {
+ additionalTags = {
+ "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]" = "Resource"
}
+ tags = "[base64ToJson(parameters('commonTags'))]"
}
}
)
}
Plan: 19 to add, 0 to change, 0 to destroy. |
…ry_Changes__Part1
…ry_Changes__Part1
…PRM_Entity_and_Repository_Changes__Part1 Conflicts: src/integrationTest/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/ProfessionalUserIntegrationTest.java
markharriscgi
approved these changes
Sep 16, 2025
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.
LGTM
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.
Jira link
DTSAM-1020 "GA: Late PRM table and Data Repository changes"
Change description
Update data type in entity model for jsonb fields:
Expand Integration Tests for Repositories: