Skip to content

blackbird-cloud/terraform-azurerm-log-analytics-workspace

Repository files navigation

Terraform Azurerm Log Analytics Workspace Module

Terraform module to create an Azure Log Analytics Workspace

blackbird-logo

Example

module "log_analytics_workspace" {
  source  = "blackbird-cloud/log-analytics-workspace/azurerm"
  version = "~> 1"

  create_new_workspace = true
  name                 = "example-law"
  location             = "westeurope"
  resource_group_name  = "example-law"
  tags = {
    environment = "dev"
  }
}

Requirements

Name Version
terraform >= 1.2
azurerm ~> 3.8

Providers

Name Version
azurerm ~> 3.8

Resources

Name Type
azurerm_log_analytics_workspace.law resource

Inputs

Name Description Type Default Required
allow_resource_only_permissions Whether users require permissions to resources to view logs bool true no
cmk_for_query_forced Whether or not a Customer Managed Key for the query is forced bool false no
create_new_workspace Whether or not you wish to create a new workspace, if set to true, a new one will be created, if set to false, a data read will be performed on a data source bool n/a yes
daily_quota_gb The amount of gb set for max daily ingetion number -1 no
internet_ingestion_enabled Whether internet ingestion is enabled bool true no
internet_query_enabled Whether or not your workspace can be queried from the internet bool true no
local_authentication_disabled Whether local authentication is enabled, defaults to false bool false no
location The location for this resource to be put in string n/a yes
name The name of a log analytics workspace string n/a yes
reservation_capacity_in_gb_per_day The reservation capacity gb per day, can only be used with CapacityReservation SKU number null no
resource_group_name The name of the resource group, this module does not create a resource group, it is expecting the value of a resource group already exists string n/a yes
retention_in_days The number of days for retention, between 7 and 730 string 30 no
sku The sku of the log analytics workspace string "PerGB2018" no
tags A map of the tags to use on the resources that are deployed with this module. map(string)
{
"source": "terraform"
}
no

Outputs

Name Description
law_id The id of the log analytics workspace. If a new log analytic workspace is created, fetch its data id, if one is created, fetch the remote one instead
law_name The name of the log analytics workspace
law_primary_key The primary key of the log analytics workspace. If a new log analytic workspace is created, fetch its data id, if one is created, fetch the remote one instead
law_secondary_key The primary key of the log analytics workspace. If a new log analytic workspace is created, fetch its data id, if one is created, fetch the remote one instead
law_workspace_id The workspace id of the log analytics workspace. If a new log analytic workspace is created, fetch its data id, if one is created, fetch the remote one instead

About

We are Blackbird Cloud, Amsterdam based cloud consultancy, and cloud management service provider. We help companies build secure, cost efficient, and scale-able solutions.

Checkout our other 👉 terraform modules

Copyright

Copyright © 2017-2024 Blackbird Cloud

About

Terraform module to create an Azure Log Analytics Workspace

Topics

Resources

License

Stars

0 stars

Watchers

2 watching

Forks

Packages

 
 
 

Contributors

Languages