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/deployment-environments/how-to-create-configure-dev-center.md
+18-20Lines changed: 18 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,29 @@
1
1
---
2
2
title: Create and configure a dev center for Azure Deployment Environments by using the Azure CLI
3
3
titleSuffix: Azure Deployment Environments
4
-
description: Learn how to create and access a dev center for Azure Deployment Environments project using the Azure CLI.
4
+
description: Learn how to create and configure a dev center for an Azure Deployment Environments project by using the Azure CLI.
5
5
author: renato-marciano
6
6
ms.author: remarcia
7
7
ms.service: azure-deployment-environments
8
8
ms.custom: devx-track-azurecli, build-2023
9
9
ms.topic: quickstart
10
10
ms.date: 03/20/2025
11
+
12
+
#customer intent: As a platform engineer, I want to create and configure a dev center so that my teams can deploy applications.
11
13
---
12
14
13
15
# Create and configure a dev center for Azure Deployment Environments by using the Azure CLI
14
16
15
-
This quickstart guide shows you how to create and configure a dev center in Azure Deployment Environments.
17
+
In this quickstart, you create and configure a dev center in Azure Deployment Environments.
16
18
17
19
A platform engineering team typically sets up a dev center, attaches external catalogs to the dev center, creates projects, and provides access to development teams. Development teams can then create [environments](concept-environments-key-concepts.md#environments) by using [environment definitions](concept-environments-key-concepts.md#environment-definitions), connect to individual resources, and deploy applications.
18
20
19
21
## Prerequisites
20
22
21
-
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
22
-
- Azure role-based access control role with permissions to create and manage resources in the subscription, such as [Contributor](../role-based-access-control/built-in-roles.md#contributor) or [Owner](../role-based-access-control/built-in-roles.md#owner).
23
-
- Install the [Azure CLI devcenter extension](how-to-install-devcenter-cli-extension.md).
24
-
-A GitHub account and a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with repo access.
23
+
|Category|Requirements|
24
+
|-|-|
25
+
|Azure|- An [Azure subscription](https://azure.microsoft.com/free/).<br>- An Azure role-based access control role that has permissions to create and manage resources in the subscription, such as [Contributor](../role-based-access-control/built-in-roles.md#contributor) or [Owner](../role-based-access-control/built-in-roles.md#owner).<br>-The [Azure CLI devcenter extension](how-to-install-devcenter-cli-extension.md).|
26
+
|GitHub|A GitHub account and a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with repo access.|
25
27
26
28
## Create a dev center
27
29
@@ -45,7 +47,7 @@ To create and configure a dev center in Azure Deployment Environments:
45
47
az account set --subscription <subscriptionName>
46
48
```
47
49
48
-
1. Configure the default location where you want to create the dev center. Make sure to choose an [available region for Azure Deployment Environments](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/?products=deployment-environments®ions=all):
50
+
1. Configure the default location where you want to create the dev center. Make sure to choose a [region that supports Azure Deployment Environments](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/?products=deployment-environments®ions=all).
49
51
50
52
```azurecli
51
53
az configure --defaults location=eastus
@@ -106,6 +108,11 @@ You need an Azure Key Vault to store the GitHub personal access token (PAT) that
106
108
> You might get the following error:
107
109
`Code: VaultAlreadyExists Message: The vault name 'kv-devcenter-unique' is already in use. Vault names are globally unique so it is possible that the name is already taken.` You must use a globally unique key vault name.
108
110
111
+
1. Assign yourself the Key Vault Secrets Officer RBAC role:
112
+
113
+
```azurecli
114
+
az role assignment create --assignee <YourPrincipalId> --role "Key Vault Secrets Officer" --scope /subscriptions/<YourSubscriptionId>/resourceGroups/<YourResourceGroupName>/providers/Microsoft.KeyVault/vaults/<YourKeyVaultName>
115
+
109
116
1. Add the GitHub PAT to Key Vault as a secret:
110
117
111
118
```azurecli
@@ -128,20 +135,11 @@ To attach a system-assigned managed identity to your dev center:
128
135
129
136
### Give the system-assigned managed identity access to the key vault secret
130
137
131
-
Make sure that the identity has access to the key vault secret that contains the GitHub PAT to access your repository. Key Vaults support two methods of access; Azure role-based access control or vault access policy. In this quickstart, you use a vault access policy.
132
-
133
-
1. Retrieve the Object ID of your dev center's identity:
134
-
135
-
```azurecli
136
-
OID=$(az ad sp list --display-name <devcenterName> --query [].id -o tsv)
137
-
echo $OID
138
-
```
139
-
140
-
1. Add a Key Vault policy to allow the dev center to get secrets from Key Vault:
138
+
Make sure that the identity has access to the key vault secret that contains the GitHub PAT to access your repository. Key Vaults support two methods of access; Azure role-based access control (RBAC) or vault access policy. In this quickstart, you use RBAC:
141
139
142
-
```azurecli
143
-
az keyvault set-policy -n <keyvaultName> --secret-permissions get --object-id $OID
144
-
```
140
+
```azurecli
141
+
az role assignment create --role "Key Vault Secrets Officer" --assignee <devCenterManagedIdentityObjectID> --scope /subscriptions/<subscriptionID>/resourcegroups/<resourceGroupName/providers/Microsoft.KeyVault/vaults/<keyVaultName>
0 commit comments