@@ -63,15 +63,15 @@ To create a project in your dev center:
63
63
1 . Retrieve the dev center resource ID:
64
64
65
65
``` 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
68
68
```
69
69
70
70
1. Create the project in the dev center:
71
71
72
72
```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." `
75
75
--dev-center-id $DEVCID
76
76
```
77
77
@@ -90,22 +90,22 @@ In this quickstart, you assign the Owner role to the system-assigned managed ide
90
90
1. Retrieve the subscription ID:
91
91
92
92
```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
95
95
```
96
96
97
97
1. Retrieve the object ID of the dev center's identity by using the name of the dev center resource:
98
98
99
99
```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
102
102
```
103
103
104
104
1. Assign the role of Owner to the dev center on the subscription:
105
105
106
106
```azurecli
107
- az role assignment create --assignee $OID \
108
- --role "Owner" \
107
+ az role assignment create --assignee $OID `
108
+ --role "Owner" `
109
109
--scope "/subscriptions/$SUBID"
110
110
```
111
111
@@ -119,8 +119,8 @@ To configure a project, add a [project environment type](how-to-configure-projec
119
119
# Remove the group default scope for next the command.
120
120
az configure --defaults group=
121
121
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
124
124
125
125
# Set the default resource group again.
126
126
az configure --defaults group=<resourceGroupName>
@@ -135,12 +135,14 @@ To configure a project, add a [project environment type](how-to-configure-projec
135
135
1. Choose an environment type and create it for the project:
136
136
137
137
```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
144
146
```
145
147
146
148
> [!NOTE]
@@ -153,23 +155,23 @@ In this quickstart, you give access to your own ID. Optionally, you can replace
153
155
1. Retrieve your own object ID:
154
156
155
157
```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
158
160
```
159
161
160
162
1. Assign admin access:
161
163
162
164
```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" `
165
167
--scope "/subscriptions/$SUBID"
166
168
```
167
169
168
170
1. Optionally, you can assign the Dev Environment User role:
169
171
170
172
```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" `
173
175
--scope "/subscriptions/$SUBID"
174
176
```
175
177
0 commit comments