Azure Monitor Module¶
This is a parent module that contains sub-modules for the various Azure Monitor resources in the azurerm_monitor* suite.
Notes¶
- The most basic usage requires an Action Group and one type of Alert.
Included submodules:¶
| Name | Link |
|---|---|
| action-group | action-group |
| metric-alert | metric-alert |
| query-alert | query-alert |
| smart-detector-alert | smart-detector-alert |
Usage¶
module "monitoring-action-group" {
source = "git::ssh://git@ssh.dev.azure.com/v3/cmgfidev/DevOps/shared-infrastructure//modules/azure-monitor/action-group?ref=v{x.y.z}"
name = string # Required
display_name = string # Required
rg = object # Required
email_addresses = map(string) # Required
tags = map(string) # Optional
output "action-group" {
value = module.monitoring-action-group.this
}
Objects¶
Examples¶
Create a single group with all defaults¶
module "monitoring-action-group" {
source = "git::ssh://git@ssh.dev.azure.com/v3/cmgfidev/DevOps/shared-infrastructure//modules/azure-monitor/action-group?ref=v{x.y.z}"
name = "CmgCxNotificationGroupProd01"
display_name = "CxAlertProd"
rg = {
name = azurerm_resource_group.this.name
location = azurerm_resource_group.this.location
}
email_addresses = {
"Andy Osborn (NTERSOL)" = "andy.osborn@cmgfi.com"
}
tags = local.tags
}
output "action-group" {
value = module.monitoring-action-group.this
}