Skip to content

Commit bcda46f

Browse files
Merge pull request #297004 from renato-marciano/patch-3
Update how-to-create-configure-projects.md
2 parents 5942b48 + cb538a2 commit bcda46f

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

articles/deployment-environments/how-to-create-configure-projects.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ To create a project in your dev center:
6363
1. Retrieve the dev center resource ID:
6464

6565
```azurecli
66-
DEVCID=$(az devcenter admin devcenter show -n <devcenterName> --query id -o tsv)
67-
echo $DEVCID
66+
$DEVCID = az devcenter admin devcenter show -n <devcenterName> --query id -o tsv
67+
Write-Output $DEVCID
6868
```
6969
7070
1. Create the project in the dev center:
7171
7272
```azurecli
73-
az devcenter admin project create -n <projectName> \
74-
--description "My first project." \
73+
az devcenter admin project create -n <projectName> `
74+
--description "My first project." `
7575
--dev-center-id $DEVCID
7676
```
7777
@@ -90,22 +90,22 @@ In this quickstart, you assign the Owner role to the system-assigned managed ide
9090
1. Retrieve the subscription ID:
9191
9292
```azurecli
93-
SUBID=$(az account show --name <subscriptionName> --query id -o tsv)
94-
echo $SUBID
93+
$SUBID = az account show --name <subscriptionName> --query id -o tsv
94+
Write-Output $SUBID
9595
```
9696
9797
1. Retrieve the object ID of the dev center's identity by using the name of the dev center resource:
9898
9999
```azurecli
100-
OID=$(az ad sp list --display-name <devcenterName> --query [].id -o tsv)
101-
echo $OID
100+
$OID = az ad sp list --display-name <devcenterName> --query [].id -o tsv
101+
Write-Output $OID
102102
```
103103
104104
1. Assign the role of Owner to the dev center on the subscription:
105105
106106
```azurecli
107-
az role assignment create --assignee $OID \
108-
--role "Owner" \
107+
az role assignment create --assignee $OID `
108+
--role "Owner" `
109109
--scope "/subscriptions/$SUBID"
110110
```
111111
@@ -119,8 +119,8 @@ To configure a project, add a [project environment type](how-to-configure-projec
119119
# Remove the group default scope for next the command.
120120
az configure --defaults group=
121121
122-
ROID=$(az role definition list -n "Owner" --scope /subscriptions/$SUBID --query [].name -o tsv)
123-
echo $ROID
122+
$ROID = az role definition list -n "Owner" --scope /subscriptions/$SUBID --query [].name -o tsv
123+
Write-Output $ROID
124124
125125
# Set the default resource group again.
126126
az configure --defaults group=<resourceGroupName>
@@ -135,12 +135,14 @@ To configure a project, add a [project environment type](how-to-configure-projec
135135
1. Choose an environment type and create it for the project:
136136
137137
```azurecli
138-
az devcenter admin project-environment-type create -n <availableEnvironmentType> \
139-
--project <projectName> \
140-
--identity-type "SystemAssigned" \
141-
--roles "{\"${ROID}\":{}}" \
142-
--deployment-target-id "/subscriptions/${SUBID}" \
143-
--status Enabled
138+
$roles = "{`"$($ROID)`":{}}"
139+
az devcenter admin project-environment-type create `
140+
-n <availableEnvironmentType> `
141+
--project <projectName> `
142+
--identity-type "SystemAssigned" `
143+
--roles $roles `
144+
--deployment-target-id "/subscriptions/$SUBID" `
145+
--status Enabled
144146
```
145147
146148
> [!NOTE]
@@ -153,23 +155,23 @@ In this quickstart, you give access to your own ID. Optionally, you can replace
153155
1. Retrieve your own object ID:
154156
155157
```azurecli
156-
MYOID=$(az ad signed-in-user show --query id -o tsv)
157-
echo $MYOID
158+
$MYOID = az ad signed-in-user show --query id -o tsv
159+
Write-Output $MYOID
158160
```
159161
160162
1. Assign admin access:
161163
162164
```azurecli
163-
az role assignment create --assignee $MYOID \
164-
--role "DevCenter Project Admin" \
165+
az role assignment create --assignee $MYOID `
166+
--role "DevCenter Project Admin" `
165167
--scope "/subscriptions/$SUBID"
166168
```
167169
168170
1. Optionally, you can assign the Dev Environment User role:
169171
170172
```azurecli
171-
az role assignment create --assignee $MYOID \
172-
--role "Deployment Environments User" \
173+
az role assignment create --assignee $MYOID `
174+
--role "Deployment Environments User" `
173175
--scope "/subscriptions/$SUBID"
174176
```
175177

0 commit comments

Comments
 (0)