equinor / terraform-baseline

Best practices for creating reusable Terraform modules using the Azure provider
https://equinor.github.io/terraform-baseline/
MIT License
10 stars 5 forks source link

Implement baseline alerts #136

Open hknutsen opened 3 months ago

hknutsen commented 3 months ago

Implement baseline alerts according to: https://azure.github.io/azure-monitor-baseline-alerts/welcome/

This opens up the possibility of moving the app-service and aci modules out of archive, because by implementing alerts we'll have a reason to keep them 🙂

Example: https://github.com/equinor/terraform-azurerm-app-service/pull/10. Note though that alert rules can be reused for multiple resources of the same type, so it might be a better idea to create an alerts submodule for each module. Discuss! 🙂

hknutsen commented 3 months ago

Alerts also have a cost, so reusing alerts could be a good idea with that in mind.

hknutsen commented 1 month ago

Interesting finding...

I was playing around with setting the scope of an alert rule to multiple resources, which gave me the following warning:

Metric and Log signals might not be available if the scope includes multiple resources.

Investigate this warning, as it might be important for the decision on whether or not alert rules should be created for each individual resource, or if alert rules should be reused across resources of the same type.