Skip to content

Commit

Permalink
Merge pull request #26 from quantum-sec/feature/XDR-4570
Browse files Browse the repository at this point in the history
XDR-4570: Remove inutile variables from package module
  • Loading branch information
chrisjaimon2012 authored Oct 10, 2023
2 parents 731c066 + 1a4efc3 commit dea7651
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 14 deletions.
41 changes: 41 additions & 0 deletions modules/log-analytics-saved-search/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.2 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | ~> 3.34 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.69.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [azurerm_log_analytics_saved_search.search](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/log_analytics_saved_search) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_category"></a> [category](#input\_category) | The category under which the saved search will be displayed. | `string` | n/a | yes |
| <a name="input_function_parameters"></a> [function\_parameters](#input\_function\_parameters) | A list of parameter definitions (strings) in the following format: `param_name:type=default_value`. | `set(string)` | `null` | no |
| <a name="input_log_analytics_workspace_id"></a> [log\_analytics\_workspace\_id](#input\_log\_analytics\_workspace\_id) | The ID of the Log Analytics workspace with which the saved search will be associated. | `string` | n/a | yes |
| <a name="input_name"></a> [name](#input\_name) | The name of the saved search. | `string` | n/a | yes |
| <a name="input_query"></a> [query](#input\_query) | The KQL query for the saved search. | `string` | n/a | yes |
| <a name="input_tags"></a> [tags](#input\_tags) | A mapping of tags to assign to the resource. | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_id"></a> [id](#output\_id) | The unique identifier of the saved search. |
<!-- END_TF_DOCS -->
4 changes: 2 additions & 2 deletions modules/log-analytics-saved-search/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ terraform {

resource "azurerm_log_analytics_saved_search" "search" {
name = var.name
display_name = coalesce(var.display_name, var.name)
display_name = var.name
category = var.category
log_analytics_workspace_id = var.log_analytics_workspace_id

query = var.query

function_alias = var.function_alias
function_alias = var.name
function_parameters = var.function_parameters

tags = var.tags
Expand Down
12 changes: 0 additions & 12 deletions modules/log-analytics-saved-search/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ variable "name" {
type = string
}

variable "display_name" {
description = "The friendly display name of the saved search."
type = string
default = null
}

variable "category" {
description = "The category under which the saved search will be displayed."
type = string
Expand All @@ -24,12 +18,6 @@ variable "query" {
type = string
}

variable "function_alias" {
description = "The function alias if the query serves as a function."
type = string
default = null
}

variable "function_parameters" {
description = "A list of parameter definitions (strings) in the following format: `param_name:type=default_value`."
type = set(string)
Expand Down

0 comments on commit dea7651

Please sign in to comment.