You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/dev-box/how-to-write-customization-file.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ ms.date: 11/06/2024
10
10
#customer intent: As a dev center administrator or DevCenter Project Admin I want to create image definition files so that my development teams can create customized dev boxes.
11
11
---
12
12
13
-
# Write a Team Customization file for Dev Box
13
+
# Write a customization file for Dev Box
14
14
In this article, you learn how to create and test a customization file for your dev box using Visual Studio Code and Dev Home.
15
15
16
16
There are two ways to use a customization file: team customizations which apply automatically once configured on a pool, and individual customizations which are applied when a user creates a dev box.
@@ -120,8 +120,11 @@ To invoke the Dev Box chat agent:
120
120
121
121
You can select **Generate Workload.yaml File** to create a file with the custom task. You can then rename the *workload.yaml* file to *imagedefintion.yaml*for use in your team customizations.
122
122
123
-
## Use secrets from an Azure Key Vault
124
-
You can use secrets from your Azure Key Vault in your yaml customizations to clone private repositories, or with any custom task you author that requires an access token.
123
+
## Clone a private repository using a customization file
124
+
You can use secrets from your Azure Key Vault in your yaml customizations to clone private repositories, or with any custom task you author that requires an access token. In a team customization file, you can use a personal access token (PAT) sotred in a key vault to access a private repository. In an individual customization file, you can also use the `{{ado}}` or `{{ado://your-ado-organization-name}}` parameter to fetch an access token on your behalf when creating a dev box.
125
+
126
+
### Use Key Vault secrets in team customization files
127
+
To clone a private repository, store your PAT as an Azure KeyVault secret, and use it when invoking the git-clone task in your customization.
125
128
126
129
To configure your Key Vault secrets for use in your yaml customizations:
127
130
1. Ensure that your dev center project's managed identity has the Key Vault Reader role and Key Vault Secrets User role on your key vault.
@@ -143,8 +146,8 @@ tasks:
143
146
directory: C:\Workspaces
144
147
pat: '{{KEY_VAULT_SECRET_URI}}'
145
148
```
146
-
147
-
If you wish to clone a private Azure Repos repository, you don't need to configure a secret in Key Vault. Instead, you can use `{{ado}}`, or `{{ado://your-ado-organization-name}}` as a parameter. This fetches an access token on your behalf when creating a dev box, which has read-only permission to your repository. The git-clone task in the quickstart catalog uses the access token to clone your repository. Here's an example:
149
+
### Use Key Vault secrets in individual customization files
150
+
If you wish to clone a private Azure Repos repository from an individual customization file, you don't need to configure a secret in Key Vault. Instead, you can use `{{ado}}`, or `{{ado://your-ado-organization-name}}` as a parameter. This fetches an access token on your behalf when creating a dev box, which has read-only permission to your repository. The git-clone task in the quickstart catalog uses the access token to clone your repository. Here's an example:
0 commit comments