DEV Community

Will Velida
Will Velida

Posted on

1

Sending Cosmos DB Diagnostic Logs to Log Analytics with Terraform

In this video, we cover Data sources in Terraform and how we can use them to reference resources defined either outside of Terraform or in other Terraform configuration files in our Terraform files.

We also talk about Diagnostic Logs in Azure are and how we can configure Diagnostic logs in our Azure Cosmos DB account to be sent to a Log Analytics workspace.

If you have any questions, comment below or reach out to me via Twitter: Twitter: https://twitter.com/willvelida

Resources:
Data Sources in Terraform: https://www.terraform.io/docs/language/data-sources/index.html
Log Analytics (Terraform Docs): https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/log_analytics_workspace#attributes-reference
Diagnostic Logs (Terraform Docs): https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_diagnostic_setting
Monitor Azure Cosmos DB data by using diagnostic settings in Azure: https://docs.microsoft.com/en-us/azure/cosmos-db/cosmosdb-monitor-resource-logs
GitHub code: https://github.com/willvelida/azurecosmosdb-terraform

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

Try REST API Generation for MS SQL Server.

DreamFactory generates live REST APIs from database schemas with standardized endpoints for tables, views, and procedures in OpenAPI format. We support on-prem deployment with firewall security and include RBAC for secure, granular security controls.

See more!

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay