I am trying to add OMS VM extension to a linux machine but its just going for an endless wait during deployment.No errors while running terraform plan. I am using the following piece of code along with VM creation code in terraform.Any clue whats happening here You can find the corresponding powershell and CLI scripts here https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/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
}
At first glance it looks like your Workspace Key and ID "Keys" are not correct, both keys do not appear to have a space in them. Azure should provide a better error like invalid key provided.
I was able to provision successfully using Terraform, it did fail for me a few times but it succeeded with this configuration.