> For the complete documentation index, see [llms.txt](https://docs.instruqt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.instruqt.com/sandboxes/cloud-accounts/azure-subscriptions/azure-environment-variables.md).

# Azure Environment Variables

Adding an Azure subscription to your track also sets a list of [environment variables](https://en.wikipedia.org/wiki/Environment_variable) that you can use in commands and scripts:

<table data-header-hidden><thead><tr><th width="488.15548281505727">Environment variable</th><th>Description</th></tr></thead><tbody><tr><td>Environment variable</td><td>Description</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTIONS</code></td><td>A comma-separated list of project names that can be used to fill ${NAME} in the variables below</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_SUBSCRIPTION_NAME</code></td><td>The subscription display name</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_SUBSCRIPTION_ID</code></td><td>The subscription ID</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_USERNAME</code></td><td>The username that can be used to sign into the Azure portal</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_PASSWORD</code></td><td>The password that can be used to sign into the Azure portal</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_SPN_ID</code></td><td>The application ID for the service principal</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_SPN_PASSWORD</code></td><td>The password for the service principal</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_TENANT_ID</code></td><td>The tenant ID for this subscription</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_ADMIN_USERNAME</code></td><td>The username that can be used to sign into the Azure portal as the admin user</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_ADMIN_PASSWORD</code></td><td>The password that can be used to sign into the Azure portal as the admin user</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_ADMIN_SPN_ID</code></td><td>The application ID for the admin service principal</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_ADMIN_SPN_PASSWORD</code></td><td>The password for the admin service principal</td></tr></tbody></table>

### Example

This example shows the id of the Azure subscription from a terminal by using two environment variables. The value of the `INSTRUQT_AZURE_SUBSCRIPTIONS` environment variable is inserted in the `INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_SUBSCRIPTION_ID` environment variable.

To follow along:

1. Start your Azure subscription track and start the first challenge.
2. Move over to the `Cloud CLI` terminal and enter the following command:

   ```xml
   eval echo "\${INSTRUQT_AZURE_SUBSCRIPTION_${INSTRUQT_AZURE_SUBSCRIPTIONS}_SUBSCRIPTION_ID}"
   ```

   ↳ The terminal shows the id of your Azure subscription.
