Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Lab secrets let platform engineers keep passwords, keys, and tokens in a single, secure location so automation and virtual machines can retrieve values without embedding them in scripts. By using Lab Secrets, you can store and use sensitive values centrally at the lab level in Azure DevTest Labs.
Prerequisites
- An existing lab. For information about creating labs, see Create a lab in the Azure portal.
- At least Contributor access to the lab.
Why use lab secrets
Using labs secrets provides several benefits:
- Better security: Store credentials, keys, and tokens securely.
- Centralized management: Define secrets once at the lab level and reuse them.
- Easier automation: Use secrets in artifacts and virtual machine (VM) setup without hardcoding values.
Example scenarios
You can use lab secrets in various scenarios, including:
- Provision multiple Windows and Linux VMs without sharing passwords over chat or email.
- Deploy artifacts from private repositories using a personal access token stored as a secret.
- Run automation scripts that retrieve API keys or SSH credentials at runtime.
Configure lab secrets
To create and manage lab secrets, follow these steps:
Go to the Azure portal and open the Overview page for your lab.
Select Configuration and Policies > Settings > Lab Secrets, and then select Add.
In the Create a lab secret pane, enter a name and value, and choose a scope: Formulas and Virtual Machines or Artifacts.
Select Create.
After creation, the secret is available in the selected scope and stored in an Azure Key Vault in the lab's resource group.
Note
DevTest Labs automatically creates an Azure Key Vault in the lab's resource group to store secrets.