0
0
Azurecloud~30 mins

Log Analytics workspace in Azure - Mini Project: Build & Apply

Choose your learning style9 modes available
Create an Azure Log Analytics Workspace
📖 Scenario: You are setting up monitoring for your cloud resources. To collect and analyze logs, you need to create a Log Analytics workspace in Azure.
🎯 Goal: Build an Azure Log Analytics workspace using Infrastructure as Code with exact configuration values.
📋 What You'll Learn
Create a resource group named monitoring-rg
Create a Log Analytics workspace named monitoring-workspace
Set the workspace location to eastus
Set the workspace SKU to PerGB2018
Enable retention of logs for 30 days
💡 Why This Matters
🌍 Real World
Log Analytics workspaces collect and analyze logs from Azure resources, helping teams monitor and troubleshoot cloud environments.
💼 Career
Cloud engineers and DevOps professionals often create and manage Log Analytics workspaces to enable centralized logging and monitoring.
Progress0 / 4 steps
1
Create the resource group
Create a resource group named monitoring-rg in the eastus location.
Azure
Need a hint?

Use the azurerm_resource_group resource with the exact name monitoring_rg.

2
Define the Log Analytics workspace configuration
Create a variable called workspace_name and set it to monitoring-workspace.
Azure
Need a hint?

Use a Terraform variable named workspace_name with the default value monitoring-workspace.

3
Create the Log Analytics workspace resource
Create an azurerm_log_analytics_workspace resource named log_analytics using the resource group monitoring_rg, workspace name from var.workspace_name, location eastus, SKU PerGB2018, and retention in days set to 30.
Azure
Need a hint?

Use the azurerm_log_analytics_workspace resource with the exact name log_analytics.

4
Finalize the Log Analytics workspace configuration
Add the tags block to the azurerm_log_analytics_workspace resource with a tag environment set to production.
Azure
Need a hint?

Add a tags block inside the workspace resource with the key environment and value production.