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

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more