Skip to content

Commit cf5500c

Browse files
authored
Merge pull request #8 from data-platform-hq/support_dcr
fix: support dcr
2 parents c10981b + ee605b9 commit cf5500c

File tree

2 files changed

+37
-8
lines changed

2 files changed

+37
-8
lines changed

main.tf

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@ resource "tls_private_key" "this" {
55

66
module "vmss" {
77
source = "data-platform-hq/vmss/azurerm"
8-
version = "1.2.1"
8+
version = "1.2.3"
99

1010
scale_set_name = var.vm_scale_set_name
1111
location = var.location
1212
resource_group = var.resource_group
13-
tags = var.tags
1413
admin_ssh_key = { public_key = tls_private_key.this.public_key_openssh }
1514
subnet_id = var.subnet_id
1615
public_ip_prefix_enabled = var.ado_vmss_public_ip_prefix_enabled
16+
17+
enable_data_collection_rule = var.drc_enabled
18+
analytics_workspace_id = var.analytics_workspace_id
19+
facility_names = var.drc_facility_names
20+
log_levels = var.drc_log_levels
21+
datasource_name = var.drc_datasource_name
1722
}
1823

1924
data "azuredevops_project" "this" {

variables.tf

+30-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ variable "subnet_id" {
1818
type = string
1919
}
2020

21-
variable "tags" {
22-
type = map(any)
23-
description = "Resource tags"
24-
default = {}
25-
}
26-
2721
variable "ado_project_name" {
2822
description = "Target Azure DevOps Project name where VMSS agent pool would be provisioned"
2923
type = string
@@ -61,3 +55,33 @@ variable "create_ado_resources" {
6155
type = bool
6256
default = true
6357
}
58+
59+
variable "analytics_workspace_id" {
60+
type = string
61+
description = "Resource ID of Log Analytics Workspace"
62+
default = null
63+
}
64+
65+
variable "drc_enabled" {
66+
type = bool
67+
description = "Enable data collection rule. var.analytics_workspace_id must be provided"
68+
default = false
69+
}
70+
71+
variable "drc_datasource_name" {
72+
type = string
73+
description = "Datasource syslog name"
74+
default = "datasource-syslog"
75+
}
76+
77+
variable "drc_facility_names" {
78+
type = list(string)
79+
description = "List of Facility names"
80+
default = ["daemon", "syslog", "user"]
81+
}
82+
83+
variable "drc_log_levels" {
84+
type = list(string)
85+
description = "List of Log levels"
86+
default = ["Debug"]
87+
}

0 commit comments

Comments
 (0)