Azure Log Analytics Linked Storage Account

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

azurerm_log_analytics_linked_storage_account (Terraform)

The Linked Storage Account in Log Analytics can be configured in Terraform with the resource name azurerm_log_analytics_linked_storage_account. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L15
resource "azurerm_log_analytics_linked_storage_account" "la_sa" {
  data_source_type      = "customlogs"
  resource_group_name   = local.resource_group_name
  workspace_resource_id = azurerm_log_analytics_workspace.la_ws.id
  storage_account_ids   = local.storage_account_ids
}
main.tf#L23
resource "azurerm_log_analytics_linked_storage_account" "burlloganalyticslinkstrg" {
  provider              = azurerm.logtarget
  data_source_type      = var.logAnalyticsDataSrcType
  resource_group_name   = azurerm_log_analytics_workspace.burlloganalytics.resource_group_name
  workspace_resource_id = azurerm_log_analytics_workspace.burlloganalytics.id
  // List of string
main.tf#L48
resource "azurerm_log_analytics_linked_storage_account" "example" {
  data_source_type      = "customlogs"
  resource_group_name   = azurerm_resource_group.example.name
  workspace_resource_id = azurerm_log_analytics_workspace.example.id
  storage_account_ids   = [azurerm_storage_account.example.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 Linked Storage Account.

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

The workspaces/linkedStorageAccounts in Microsoft.OperationalInsights can be configured in Azure Resource Manager with the resource name Microsoft.OperationalInsights/workspaces/linkedStorageAccounts. 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 Linked Storage Account?

Azure Log Analytics Linked Storage Account 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 Linked Storage Account?

For Terraform, the pravinsk4github/iaac-factory, johhess40/Terraform and vitor-o-s/Terraform-Projects source code examples are useful. See the Terraform Example section for further details.