Well-Architected Framework
Logging and monitoring
You can use Terraform to deploy and manage logging and monitoring services. Instead of creating scripts to interact with monitoring tools APIs, you can directly configure monitoring solutions like Datadog and Grafana with their Terraform providers.
Terraform uses monitoring as code (MaC) to install and set up monitoring agents to collect metrics and logs of your infrastructure and applications, and create dashboards to view the metrics and set up alerts to notify you of issues. MaC gives you all of the benefits of infrastructure as code, such as version control and automated deployments, increasing your organization’s reliability and meeting RTO and RPO expectations.
Benefits of using Terraform:
- Use monitoring as code
- Create dashboards and alerts with infrastructure as code
HashiCorp resources:
- List of logging & monitoring providers in the Terraform Registry
- Automate monitoring with the Terraform Datadog provider
External resources:
- Learn how to manage Grafana with Terraform
Next steps
In this section of Codify infrastructure and tools, you learned about using monitoring as code to define your logging and monitoring infrastructure, and how Terraform can help you. Define your logging and monitoring is part of the Define and automate processes pillar.