@@ -58,15 +58,15 @@ To create a project in your dev center:
58
58
1 . Retrieve dev center resource ID:
59
59
60
60
``` azurecli
61
- DEVCID=$( az devcenter admin devcenter show -n <devcenterName> --query id -o tsv)
62
- echo $DEVCID
61
+ $ DEVCID = az devcenter admin devcenter show -n <devcenterName> --query id -o tsv
62
+ Write-Output $DEVCID
63
63
```
64
64
65
65
1. Create project in dev center:
66
66
67
67
```azurecli
68
- az devcenter admin project create -n <projectName> \
69
- --description "My first project." \
68
+ az devcenter admin project create -n <projectName> `
69
+ --description "My first project." `
70
70
--dev-center-id $DEVCID
71
71
```
72
72
@@ -85,22 +85,22 @@ In this quickstart, you assign the Owner role to the system-assigned managed ide
85
85
1. Retrieve Subscription ID:
86
86
87
87
```azurecli
88
- SUBID=$( az account show --name <subscriptionName> --query id -o tsv)
89
- echo $SUBID
88
+ $ SUBID = az account show --name <subscriptionName> --query id -o tsv
89
+ Write-Output $SUBID
90
90
```
91
91
92
92
1. Retrieve the Object ID of the dev center's identity using the name of the dev center resource:
93
93
94
94
```azurecli
95
- OID=$( az ad sp list --display-name <devcenterName> --query [].id -o tsv)
96
- echo $OID
95
+ $ OID = az ad sp list --display-name <devcenterName> --query [].id -o tsv
96
+ Write-Output $OID
97
97
```
98
98
99
99
1. Assign the role of Owner to the dev center on the subscription:
100
100
101
101
```azurecli
102
- az role assignment create --assignee $OID \
103
- --role "Owner" \
102
+ az role assignment create --assignee $OID `
103
+ --role "Owner" `
104
104
--scope "/subscriptions/$SUBID"
105
105
```
106
106
@@ -114,8 +114,8 @@ To configure a project, add a [project environment type](how-to-configure-projec
114
114
# Remove group default scope for next command. Leave blank for group.
115
115
az configure --defaults group=
116
116
117
- ROID=$( az role definition list -n "Owner" --scope /subscriptions/$SUBID --query [].name -o tsv)
118
- echo $ROID
117
+ $ ROID = az role definition list -n "Owner" --scope /subscriptions/$SUBID --query [].name -o tsv
118
+ Write-Output $ROID
119
119
120
120
# Set default resource group again
121
121
az configure --defaults group=<resourceGroupName>
@@ -130,12 +130,14 @@ To configure a project, add a [project environment type](how-to-configure-projec
130
130
1. Choose an environment type and create it for the project:
131
131
132
132
```azurecli
133
- az devcenter admin project-environment-type create -n <availableEnvironmentType> \
134
- --project <projectName> \
135
- --identity-type "SystemAssigned" \
136
- --roles "{\"${ROID}\":{}}" \
137
- --deployment-target-id "/subscriptions/${SUBID}" \
138
- --status Enabled
133
+ $roles = "{`"$($ROID)`":{}}"
134
+ az devcenter admin project-environment-type create `
135
+ -n <availableEnvironmentType> `
136
+ --project <projectName> `
137
+ --identity-type "SystemAssigned" `
138
+ --roles $roles `
139
+ --deployment-target-id "/subscriptions/$SUBID" `
140
+ --status Enabled
139
141
```
140
142
141
143
> [!NOTE]
@@ -148,23 +150,23 @@ In this quickstart, you give access to your own ID. Optionally, you can replace
148
150
1. Retrieve your own Object ID:
149
151
150
152
```azurecli
151
- MYOID=$( az ad signed-in-user show --query id -o tsv)
152
- echo $MYOID
153
+ $ MYOID = az ad signed-in-user show --query id -o tsv
154
+ Write-Output $MYOID
153
155
```
154
156
155
157
1. Assign admin access:
156
158
157
159
```azurecli
158
- az role assignment create --assignee $MYOID \
159
- --role "DevCenter Project Admin" \
160
+ az role assignment create --assignee $MYOID `
161
+ --role "DevCenter Project Admin" `
160
162
--scope "/subscriptions/$SUBID"
161
163
```
162
164
163
165
1. Optionally, you can assign the Dev Environment User role:
164
166
165
167
```azurecli
166
- az role assignment create --assignee $MYOID \
167
- --role "Deployment Environments User" \
168
+ az role assignment create --assignee $MYOID `
169
+ --role "Deployment Environments User" `
168
170
--scope "/subscriptions/$SUBID"
169
171
```
170
172
0 commit comments