From 65452918c301c967b2c70b30ed45df4506dc47e5 Mon Sep 17 00:00:00 2001 From: Yan Zhu <105691024+yanzhudd@users.noreply.github.com> Date: Thu, 14 Jul 2022 10:55:44 +0800 Subject: [PATCH] [Compute] Fix #22654: az vm/vmss run-command: Fix the bug that --protected-parameters does not achieve the desired effect (#23175) --- src/azure-cli/azure/cli/command_modules/vm/custom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/custom.py b/src/azure-cli/azure/cli/command_modules/vm/custom.py index 09d32864402..5ba026cfef8 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -2479,7 +2479,7 @@ def vm_run_command_create(client, if protected_parameters is not None: auto_arg_name_num = 0 run_command['protected_parameters'] = [] - for p in parameters: + for p in protected_parameters: if '=' in p: n, v = p.split('=', 1) else: @@ -2553,7 +2553,7 @@ def vm_run_command_update(client, if protected_parameters is not None: auto_arg_name_num = 0 run_command['protected_parameters'] = [] - for p in parameters: + for p in protected_parameters: if '=' in p: n, v = p.split('=', 1) else: @@ -4039,7 +4039,7 @@ def vmss_run_command_create(client, if protected_parameters is not None: auto_arg_name_num = 0 run_command['protected_parameters'] = [] - for p in parameters: + for p in protected_parameters: if '=' in p: n, v = p.split('=', 1) else: @@ -4115,7 +4115,7 @@ def vmss_run_command_update(client, if protected_parameters is not None: auto_arg_name_num = 0 run_command['protected_parameters'] = [] - for p in parameters: + for p in protected_parameters: if '=' in p: n, v = p.split('=', 1) else: