Skip to content

Terraform module to create an Azure Monitor Workspace for AKS

License

Notifications You must be signed in to change notification settings

blackbird-cloud/terraform-azurerm-aks-monitor-workspace

Repository files navigation

Terraform Azurerm Aks Monitor Workspace Module

Terraform module to create an Azure Monitor Workspace for AKS

blackbird-logo

Example

locals {
  non_prod = {
    aks_id = "00000000-0000-0000-0000-000000000000"
  }
  prod = {
    aks_id = "00000000-0000-0000-0000-000000000000"
  }
}

module "aks_monitor_workspace" {
  source  = "blackbird-cloud/aks-monitor-workspace/azurerm"
  version = "~> 1"

  resource_group_name     = "shared-tools"
  resource_group_location = "westeurope"
  monitor_workspace_name  = "shared-aks-monitor"

  clusters = {
    non_prod = local.non_prod.aks_id
    prod     = local.prod.aks_id
  }
}

Requirements

Name Version
terraform >= 1.2
azurerm ~> 3

Providers

Name Version
azurerm ~> 3

Resources

Name Type
azurerm_monitor_alert_prometheus_rule_group.kubernetes_recording_rules_rule_group resource
azurerm_monitor_alert_prometheus_rule_group.node_recording_rules_rule_group resource
azurerm_monitor_data_collection_endpoint.dce resource
azurerm_monitor_data_collection_rule.dcr resource
azurerm_monitor_data_collection_rule_association.dcra resource
azurerm_monitor_workspace.amw resource
azurerm_private_endpoint.amw resource

Inputs

Name Description Type Default Required
clusters List of Kubernetes clusters to monitor. map(string) n/a yes
monitor_workspace_name Name of the Azure Monitor workspace. string n/a yes
private_endpoint Private endpoint to connect to the Azure Monitor workspace.
object({
subnet_id = optional(string)
subresource_names = optional(list(string))
})
{} no
public_network_access_enabled Enable or disable public network access to the Azure Monitor workspace. bool true no
resource_group_location Location of the resource group. string n/a yes
resource_group_name Name of the resource group. string n/a yes

Outputs

Name Description
clusters The list of Kubernetes clusters to monitor.
default_data_collection_endpoint_id The default data collection rule ID of the Azure Monitor Workspace.
default_data_collection_rule_id The default data collection rule ID of the Azure Monitor Workspace.
id The ID of the Azure Monitor Workspace.
name The URL of the Azure Monitor Workspace.
private_endpoint_dns The private endpoint DNS to connect to the Azure Monitor Workspace.
private_endpoint_id The private endpoint ID to connect to the Azure Monitor Workspace.
private_endpoint_ips The private endpoint to connect to the Azure Monitor Workspace.
query_endpoint The query endpoint of the Azure Monitor Workspace.

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 Monitor Workspace for AKS

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages