I'm trying to provision two Azure
Virtual Machine Extensions
, that have parameters associated to them:
- Microsoft Antimalware
- Site24x7 Agent for Windows Server Monitoring
I could not find much documentation, but I tried to extract the data from the azure portal under Automation script
to see how it was setup in JSON template.
resource "azurerm_virtual_machine_extension" "test1" {
name = "IaaSAntimalware"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
virtual_machine_name = "${azurerm_virtual_machine.testapp.name}"
publisher = "Microsoft.Azure.Security"
type = "IaaSAntimalware"
type_handler_version = "1.5.5.1"
auto_upgrade_minor_version = "true"
settings = <<SETTINGS
{
"AntimalwareEnabled": true,
"RealtimeProtectionEnabled": "true",
"ScheduledScanSettings": {
"isEnabled": "true",
"day": "1",
"time": "120",
"scanType": "Quick"
},
"Exclusions": {
"Extensions": "",
"Paths": "",
"Processes": ""
}
}
SETTINGS
tags {
environment = "${var.tag_env}" }
}
Azure Portal Configuration for Antimalware Extension
azurerm_virtual_machine_extension.test1: 1 error(s) occurred:`
azurerm_virtual_machine_extension.test1: compute.VirtualMachineExtensionsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidParameter" Message="The value of parameter typeHandlerVersion is invalid."
Does anyone know the proper syntax?