0

我正在尝试配置两个AzureVirtual Machine Extensions,它们具有与之关联的参数:

  1. 微软反恶意软件
  2. 用于 Windows 服务器监控的 Site24x7 代理

我找不到太多文档,但我尝试从下面的 azure 门户中提取数据,Automation script以查看它是如何在 JSON 模板中设置的。

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 门户配置

azurerm_virtual_machine_extension.test1:发生 1 个错误:`

azurerm_virtual_machine_extension.test1:compute.VirtualMachineExtensionsClient#CreateOrUpdate:发送请求失败:StatusCode=400 -- 原始错误:autorest/azure:服务返回错误。" Status=400 Code="InvalidParameter" Message="参数typeHandlerVersion的值无效。"

有谁知道正确的语法?

4

1 回答 1

0

如果您查看azure-quickstart-templates 的 anti-malware-extension-windows-vm 示例中的这一行"typeHandlerVersion": "1.1",:您会看到您传递了错误的版本值。

于 2018-02-21T14:52:07.603 回答