From 18240a87c6fe33fc28a4f0a50435b34046af5ddd Mon Sep 17 00:00:00 2001 From: Yair Raviv <118274492+chkp-yairra@users.noreply.github.com> Date: Mon, 21 Aug 2023 12:03:47 +0300 Subject: [PATCH] Terraform | Azure VMSS | support 'empty password' --- terraform/azure/vmss-existing-vnet/main.tf | 2 +- terraform/azure/vmss-new-vnet/main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/azure/vmss-existing-vnet/main.tf b/terraform/azure/vmss-existing-vnet/main.tf index f694a868..6c65e7a1 100755 --- a/terraform/azure/vmss-existing-vnet/main.tf +++ b/terraform/azure/vmss-existing-vnet/main.tf @@ -25,7 +25,7 @@ module "common" { source = "../modules/common" resource_group_name = var.resource_group_name location = var.location - admin_password = var.admin_password + admin_password = var.authentication_type == "SSH Public Key" ? random_id.random_id.hex : var.admin_password installation_type = var.installation_type template_name = var.template_name template_version = var.template_version diff --git a/terraform/azure/vmss-new-vnet/main.tf b/terraform/azure/vmss-new-vnet/main.tf index 332774c4..e2b283f5 100755 --- a/terraform/azure/vmss-new-vnet/main.tf +++ b/terraform/azure/vmss-new-vnet/main.tf @@ -25,7 +25,7 @@ module "common" { source = "../modules/common" resource_group_name = var.resource_group_name location = var.location - admin_password = var.admin_password + admin_password = var.authentication_type == "SSH Public Key" ? random_id.random_id.hex : var.admin_password installation_type = var.installation_type template_name = var.template_name template_version = var.template_version