79346046

Date: 2025-01-10 14:42:18
Score: 1
Natty:
Report link

I found an article of Microsoft.

Don't use secure strings or objects as output values. If you include a secure value as an output value, the value isn't displayed in the deployment history and can't be retrieved from another template. Instead, save the secure value in a key vault, and pass as a parameter from the key vault.

In this case I am changing the way of deployment and doing it this way.

  1. Get the secret from the key vault (if exists).
  2. Disable the current version if step 1 is true.
  3. Deploy the arm template.
  4. Set the secret in the key vault from the arm template in step 3.
  5. Download the secret in the next task from the key vault with the key vault task and use the variable in the second arm template.

For step 5 the property RunAsPreJob must set to false on the AzureKeyVault@2 task. So you can download the secret after defined in step 3/4.

For me this workaround/option/solution works now.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Sergio