Skip to content

avidhara/terraform-azurerm-log-analytics-workspace

Repository files navigation

Terraform module for Azure Log Analytics Workspace

How to use it as a module

Requirements

Name Version
terraform >= 0.13.1
azurerm >= 3.0.0

Providers

Name Version
azurerm >= 3.0.0

Modules

No modules.

Resources

Name Type
azurerm_log_analytics_solution.this resource
azurerm_log_analytics_workspace.this resource

Inputs

Name Description Type Default Required
allow_resource_only_permissions (Optional) Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true. bool true no
cmk_for_query_forced Optional) Is Customer Managed Storage mandatory for query management? bool false no
create_log_analytics_solution (Optional) Do you want to create log analytics solution bool true no
create_log_analytics_workspace Do you want to create Log analytics workspace bool true no
daily_quota_gb (Optional) The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. string "-1" no
internet_ingestion_enabled (Optional) Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true. bool true no
internet_query_enabled (Optional) Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true. bool true no
local_authentication_disabled (Optional) Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false. bool false no
location (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. string n/a yes
name (Required) Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or '-'. The '-' shouldn't be the first or the last symbol. Changing this forces a new resource to be created. string n/a yes
plan (Optional) A plan block any
[
{
"product": "OMSGallery/ContainerInsights",
"publisher": "Microsoft"
}
]
no
reservation_capacity_in_gb_per_day (Optional) The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000. number null no
resource_group_name (Required) The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created. string n/a yes
retention_in_days (Optional) The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730. number 30 no
sku (Optional) Specifies the SKU of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new SKU as of 2018-04-03). Defaults to PerGB2018. string "PerGB2018" no
solution_name (Optional) Specifies the name of the solution to be deployed. See here for options.Changing this forces a new resource to be created. string "ContainerInsights" no
tags (Optional) A mapping of tags to assign to the resource. map(string) {} no

Outputs

Name Description
id The Log Analytics Workspace ID.
primary_shared_key The Primary shared key for the Log Analytics Workspace.
secondary_shared_key The Secondary shared key for the Log Analytics Workspace.
workspace_id The Workspace (or Customer) ID for the Log Analytics Workspace.