Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FEATURES:

ENHANCEMENTS:

*
* Adding Log Analytics & Antimalware VM extensions ([#2520](https://github.com/microsoft/AzureTRE/pull/2520))

BUG FIXES:

Expand Down
2 changes: 1 addition & 1 deletion resource_processor/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.3"
__version__ = "0.4.4"
2 changes: 2 additions & 0 deletions resource_processor/shared/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def shell_output_logger(console_output: str, prefix_item: str, logger: logging.L
logging.debug("shell console output is empty.")
return

console_output = console_output.strip()

if (logging_level != logging.INFO
and len(console_output) < 200
and console_output.startswith("Unable to find image '")
Expand Down
13 changes: 13 additions & 0 deletions templates/core/terraform/admin-jumpbox.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,16 @@ SETTINGS
data "template_file" "vm_config" {
template = file("${path.module}/admin-jumpbox-configure.ps1")
}

resource "azurerm_virtual_machine_extension" "antimalware" {
virtual_machine_id = azurerm_windows_virtual_machine.jumpbox.id
name = "${azurerm_windows_virtual_machine.jumpbox.name}-AntimalwareExtension"
publisher = "Microsoft.Azure.Security"
type = "IaaSAntimalware"
type_handler_version = "1.3"
auto_upgrade_minor_version = true

settings = jsonencode({
"AntimalwareEnabled" = true
})
}
8 changes: 8 additions & 0 deletions templates/core/terraform/azure-monitor/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ output "log_analytics_workspace_id" {
output "log_analytics_workspace_name" {
value = azurerm_log_analytics_workspace.core.name
}

output "log_analytics_workspace_primary_key" {
value = azurerm_log_analytics_workspace.core.primary_shared_key
}

output "log_analytics_workspace_workspace_id" {
value = azurerm_log_analytics_workspace.core.workspace_id
}
2 changes: 2 additions & 0 deletions templates/core/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ module "resource_processor_vmss_porter" {
subscription_id = var.arm_subscription_id
resource_processor_number_processes_per_instance = var.resource_processor_number_processes_per_instance
resource_processor_vmss_sku = var.resource_processor_vmss_sku
log_analytics_workspace_workspace_id = module.azure_monitor.log_analytics_workspace_workspace_id
log_analytics_workspace_primary_key = module.azure_monitor.log_analytics_workspace_primary_key

depends_on = [
module.network,
Expand Down
26 changes: 23 additions & 3 deletions templates/core/terraform/resource_processor/vmss_porter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,40 @@ resource "azurerm_linux_virtual_machine_scale_set" "vm_linux" {
tags = local.tre_core_tags

extension {
auto_upgrade_minor_version = false
auto_upgrade_minor_version = true
automatic_upgrade_enabled = false
name = "healthRepairExtension"
provision_after_extensions = []
publisher = "Microsoft.ManagedServices"
type = "ApplicationHealthLinux"
type_handler_version = "1.0"

settings = jsonencode(
{
port = 8080
protocol = "http"
requestPath = "/health"
}
)
type = "ApplicationHealthLinux"
type_handler_version = "1.0"
}

extension {
auto_upgrade_minor_version = true
automatic_upgrade_enabled = false
name = "OmsAgentForLinux"
publisher = "Microsoft.EnterpriseCloud.Monitoring"
type = "OmsAgentForLinux"
type_handler_version = "1.0"

protected_settings = jsonencode({
"workspaceKey" = "${var.log_analytics_workspace_primary_key}"
})

settings = jsonencode({
"workspaceId" = "${var.log_analytics_workspace_workspace_id}",
"stopOnMultipleConnections" = false
"skipDockerProviderInstall" = true
})
}

automatic_os_upgrade_policy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ variable "subscription_id" {
type = string
default = ""
}

variable "log_analytics_workspace_workspace_id" {}
variable "log_analytics_workspace_primary_key" {}
2 changes: 1 addition & 1 deletion templates/core/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.19"
__version__ = "0.4.20"