我正在尝试配置两个Azure
Virtual Machine Extensions
,它们具有与之关联的参数:
- 微软反恶意软件
- 用于 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}" }
}
azurerm_virtual_machine_extension.test1:发生 1 个错误:`
azurerm_virtual_machine_extension.test1:compute.VirtualMachineExtensionsClient#CreateOrUpdate:发送请求失败:StatusCode=400 -- 原始错误:autorest/azure:服务返回错误。" Status=400 Code="InvalidParameter" Message="参数typeHandlerVersion的值无效。"
有谁知道正确的语法?