From 610c1c15eebf2100d81cc1e0743141a78625cc2f Mon Sep 17 00:00:00 2001 From: Alexey-Ayupov <116575425+Alexey-Ayupov@users.noreply.github.com> Date: Tue, 7 Oct 2025 11:05:18 +0200 Subject: [PATCH] [Ubuntu] Add ssh_clear_authorized_keys to Packer template (#13136) --- images/ubuntu/templates/source.ubuntu.pkr.hcl | 1 + images/ubuntu/templates/variable.ubuntu.pkr.hcl | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/images/ubuntu/templates/source.ubuntu.pkr.hcl b/images/ubuntu/templates/source.ubuntu.pkr.hcl index 4080b9b86..e29dacccd 100644 --- a/images/ubuntu/templates/source.ubuntu.pkr.hcl +++ b/images/ubuntu/templates/source.ubuntu.pkr.hcl @@ -22,6 +22,7 @@ source "azure-arm" "image" { os_disk_size_gb = local.image_properties.os_disk_size_gb os_type = var.image_os_type private_virtual_network_with_public_ip = var.private_virtual_network_with_public_ip + ssh_clear_authorized_keys = var.ssh_clear_authorized_keys temp_resource_group_name = var.temp_resource_group_name virtual_network_name = var.virtual_network_name virtual_network_resource_group_name = var.virtual_network_resource_group_name diff --git a/images/ubuntu/templates/variable.ubuntu.pkr.hcl b/images/ubuntu/templates/variable.ubuntu.pkr.hcl index e2c6aaf76..ef48d309d 100644 --- a/images/ubuntu/templates/variable.ubuntu.pkr.hcl +++ b/images/ubuntu/templates/variable.ubuntu.pkr.hcl @@ -102,6 +102,10 @@ variable "source_image_version" { type = string default = "latest" } +variable "ssh_clear_authorized_keys" { + type = bool + default = true +} variable "temp_resource_group_name" { type = string default = "${env("TEMP_RESOURCE_GROUP_NAME")}"