-
Notifications
You must be signed in to change notification settings - Fork 3
/
ms_endpoint_protection.tf
41 lines (35 loc) · 1.85 KB
/
ms_endpoint_protection.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
resource "azurerm_virtual_machine_scale_set_extension" "endpoint_protection" {
count = var.install_endpoint_protection == true && lower(var.os_type) == "windows" && var.virtual_machine_type == "vmss" ? 1 : 0
depends_on = [azurerm_virtual_machine_scale_set_extension.dynatrace_oneagent]
name = "AntiMalwareEndpointProtection"
virtual_machine_scale_set_id = var.virtual_machine_scale_set_id
publisher = "Microsoft.Azure.Security"
type = "IaaSAntimalware"
type_handler_version = var.endpoint_protection_handler_version
auto_upgrade_minor_version = var.endpoint_protection_upgrade_minor_version
settings = <<SETTINGS
{
"AntimalwareEnabled": "${var.antimalwareenabled}",
"RealtimeProtectionEnabled": "${var.realtimeprotectionenabled}",
"ScheduledScanSettings": ${jsonencode(var.scheduledscansettings)}
}
SETTINGS
}
resource "azurerm_virtual_machine_extension" "endpoint_protection" {
count = var.install_endpoint_protection == true && lower(var.os_type) == "windows" && var.virtual_machine_type == "vm" ? 1 : 0
depends_on = [azurerm_virtual_machine_extension.dynatrace_oneagent]
name = "AntiMalwareEndpointProtection"
virtual_machine_id = var.virtual_machine_id
publisher = "Microsoft.Azure.Security"
type = "IaaSAntimalware"
type_handler_version = var.endpoint_protection_handler_version
auto_upgrade_minor_version = var.endpoint_protection_upgrade_minor_version
settings = <<SETTINGS
{
"AntimalwareEnabled": "${var.antimalwareenabled}",
"RealtimeProtectionEnabled": "${var.realtimeprotectionenabled}",
"ScheduledScanSettings": ${jsonencode(var.scheduledscansettings)}
}
SETTINGS
tags = var.common_tags
}