我正在尝试将 OMS VM 扩展添加到 linux 机器,但它只是在部署过程中无休止地等待。运行 terraform 计划时没有错误。我在 terraform 中使用以下代码和 VM 创建代码。任何线索在这里发生了什么您可以在此处找到相应的 powershell 和 CLI 脚本 https://docs.microsoft.com/en-us/azure/virtual-machines /扩展/oms-linux
resource "azurerm_virtual_machine_extension" "test" {
name = "${azurerm_virtual_machine.test.name}/OmsExtension"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
virtual_machine_name = "${azurerm_virtual_machine.test.name}"
publisher = "Microsoft.EnterpriseCloud.Monitoring"
type = "OmsAgentForLinux"
type_handler_version = "1.4"
settings = <<SETTINGS
{
"workspace ID" : "XXXX",
}
SETTINGS
protected_settings = <<PROTECTED_SETTINGS
{
"workspace key" : "XXXX"
}
PROTECTED_SETTINGS
}