Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Log Analytics Workspace module to create log analytics solution optionally #99

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ resource "azurerm_log_analytics_workspace" "log_analytics_workspace" {
}

resource "azurerm_log_analytics_solution" "log_analytics_solution" {
solution_name = "ContainerInsights"
count = var.log_analytics_solution_enabled ? 1 : 0
solution_name = var.log_analytics_solution_name
location = var.location
resource_group_name = var.resource_group_name
workspace_resource_id = azurerm_log_analytics_workspace.log_analytics_workspace.id
Expand Down
12 changes: 12 additions & 0 deletions modules/azurerm/Log-Analytics-Workspace/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,15 @@ variable "log_analytics_abbreviation" {
type = string
default = "log"
}

variable "log_analytics_solution_enabled" {
description = "Should the Log Analytics Solution be enabled?"
type = bool
default = false
}

variable "log_analytics_solution_name" {
description = "The name of the Log Analytics Solution."
type = string
default = "ContainerInsights"
}
Loading