Skip to content

Commit

Permalink
enable encryption at host for vms
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvalyaron committed Jan 8, 2025
1 parent f26ab35 commit 7d55c11
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/terraform/resource_processor/vmss_porter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ resource "azurerm_linux_virtual_machine_scale_set" "vm_linux" {
disable_password_authentication = false
admin_password = random_password.password.result
custom_data = data.template_cloudinit_config.config.rendered
encryption_at_host_enabled = false
encryption_at_host_enabled = true
upgrade_mode = "Automatic"
tags = local.tre_core_tags

Expand Down
5 changes: 3 additions & 2 deletions core/terraform/servicebus.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ resource "azurerm_servicebus_namespace" "sb" {
dynamic "customer_managed_key" {
for_each = var.enable_cmk_encryption ? [1] : []
content {
key_vault_key_id = azurerm_key_vault_key.tre_encryption[0].id
identity_id = azurerm_user_assigned_identity.encryption[0].id
key_vault_key_id = azurerm_key_vault_key.tre_encryption[0].id
identity_id = azurerm_user_assigned_identity.encryption[0].id
infrastructure_encryption_enabled = true
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ resource "azurerm_windows_virtual_machine" "jumpbox" {
admin_username = "adminuser"
admin_password = random_password.password.result
tags = local.tre_shared_service_tags
encryption_at_host_enabled = true

source_image_reference {
publisher = "MicrosoftWindowsDesktop"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ resource "azurerm_linux_virtual_machine" "nexus" {
admin_username = "adminuser"
admin_password = random_password.nexus_vm_password.result
tags = local.tre_shared_service_tags
encryption_at_host_enabled = true

custom_data = data.template_cloudinit_config.nexus_config.rendered

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ resource "azurerm_windows_virtual_machine" "windowsvm" {
allow_extension_operations = true
admin_username = random_string.username.result
admin_password = random_password.password.result
encryption_at_host_enabled = true

custom_data = base64encode(data.template_file.download_review_data_script.rendered)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ resource "azurerm_windows_virtual_machine" "windowsvm" {
allow_extension_operations = true
admin_username = random_string.username.result
admin_password = random_password.password.result
encryption_at_host_enabled = true

custom_data = base64encode(data.template_file.download_review_data_script.rendered)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ resource "azurerm_linux_virtual_machine" "linuxvm" {
disable_password_authentication = false
admin_username = random_string.username.result
admin_password = random_password.password.result
encryption_at_host_enabled = true

custom_data = data.template_cloudinit_config.config.rendered

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ resource "azurerm_windows_virtual_machine" "windowsvm" {
allow_extension_operations = true
admin_username = random_string.username.result
admin_password = random_password.password.result
encryption_at_host_enabled = true

custom_data = base64encode(templatefile(
"${path.module}/vm_config.ps1", {
Expand Down

0 comments on commit 7d55c11

Please sign in to comment.