Azure Log Analytics Storage Insights

This page shows how to write Terraform and Azure Resource Manager for Log Analytics Storage Insights and write them securely.

azurerm_log_analytics_storage_insights (Terraform)

The Storage Insights in Log Analytics can be configured in Terraform with the resource name azurerm_log_analytics_storage_insights. The following sections describe 7 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L22
resource "azurerm_log_analytics_storage_insights" "blobExample_ok" {
  name                = "example-storageinsightconfig"
  resource_group_name = azurerm_resource_group.blobExample_ok.name
  workspace_id        = azurerm_log_analytics_workspace.blobExample_ok.id

  storage_account_id  = azurerm_storage_account.blobExample_ok.id
main.tf#L22
resource "azurerm_log_analytics_storage_insights" "blobExample_ok" {
  name                = "example-storageinsightconfig"
  resource_group_name = azurerm_resource_group.blobExample_ok.name
  workspace_id        = azurerm_log_analytics_workspace.blobExample_ok.id

  storage_account_id  = azurerm_storage_account.blobExample_ok.id
main.tf#L22
resource "azurerm_log_analytics_storage_insights" "analytics_storage_insights_ok" {
  name                = "example-storageinsightconfig"
  resource_group_name = azurerm_resource_group.resource_group_ok.name
  workspace_id        = azurerm_log_analytics_workspace.analytics_workspace_ok.id

  storage_account_id  = azurerm_storage_account.storage_account_ok.id
main.tf#L22
resource "azurerm_log_analytics_storage_insights" "analytics_storage_insights_ok" {
  name                = "example-storageinsightconfig"
  resource_group_name = azurerm_resource_group.resource_group_ok.name
  workspace_id        = azurerm_log_analytics_workspace.analytics_workspace_ok.id

  storage_account_id  = azurerm_storage_account.storage_account_ok.id
azurerm_log_analytics_storage_insights.example.tf#L1
resource "azurerm_log_analytics_storage_insights" "example" {
  name                = "example-storageinsightconfig"
  resource_group_name = azurerm_resource_group.examplea.name
  workspace_id        = azurerm_log_analytics_workspace.examplea.id

  storage_account_id   = azurerm_storage_account.logging.id
main.tf#L22
resource "azurerm_log_analytics_storage_insights" "blobExample_ok" {
  name                = "example-storageinsightconfig"
  resource_group_name = azurerm_resource_group.blobExample_ok.name
  workspace_id        = azurerm_log_analytics_workspace.blobExample_ok.id

  storage_account_id  = azurerm_storage_account.blobExample_ok.id
main.tf#L22
resource "azurerm_log_analytics_storage_insights" "analytics_storage_insights_ok" {
  name                = "example-storageinsightconfig"
  resource_group_name = azurerm_resource_group.resource_group_ok.name
  workspace_id        = azurerm_log_analytics_workspace.analytics_workspace_ok.id

  storage_account_id  = azurerm_storage_account.storage_account_ok.id

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Log Analytics Storage Insights resource.

Microsoft.OperationalInsights/workspaces/storageInsightConfigs (Azure Resource Manager)

The workspaces/storageInsightConfigs in Microsoft.OperationalInsights can be configured in Azure Resource Manager with the resource name Microsoft.OperationalInsights/workspaces/storageInsightConfigs. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Frequently asked questions

What is Azure Log Analytics Storage Insights?

Azure Log Analytics Storage Insights is a resource for Log Analytics of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Log Analytics Storage Insights?

For Terraform, the SnidermanIndustries/checkov-fork, melscoop-test/check and SnidermanIndustries/checkov-fork source code examples are useful. See the Terraform Example section for further details.