Skip to content

Commit f838183

Browse files
authored
Merge pull request #87658 from astaykov/patch-11
fixing variable name missmatch (identityName)
2 parents 797f57a + d7c5b67 commit f838183

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/virtual-machines/linux/image-builder-gallery.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ Image Builder will use the [user-identity](../../active-directory/managed-identi
8585

8686
```bash
8787
# create user assigned identity for image builder to access the storage account where the script is located
88-
idenityName=aibBuiUserId$(date +'%s')
89-
az identity create -g $sigResourceGroup -n $idenityName
88+
identityName=aibBuiUserId$(date +'%s')
89+
az identity create -g $sigResourceGroup -n $identityName
9090

9191
# get identity id
9292
imgBuilderCliId=$(az identity show -g $sigResourceGroup -n $identityName --query clientId -o tsv)
9393

9494
# get the user identity URI, needed for the template
95-
imgBuilderId=/subscriptions/$subscriptionID/resourcegroups/$sigResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$idenityName
95+
imgBuilderId=/subscriptions/$subscriptionID/resourcegroups/$sigResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$identityName
9696

9797
# this command will download an Azure role definition template, and update the template with the parameters specified earlier.
9898
curl https://raw.githubusercontent.com/azure/azvmimagebuilder/master/solutions/12_Creating_AIB_Security_Roles/aibRoleImageCreation.json -o aibRoleImageCreation.json
@@ -110,7 +110,7 @@ az role definition create --role-definition ./aibRoleImageCreation.json
110110
# grant role definition to the user assigned identity
111111
az role assignment create \
112112
--assignee $imgBuilderCliId \
113-
--role $imageRoleDefName \
113+
--role "$imageRoleDefName" \
114114
--scope /subscriptions/$subscriptionID/resourceGroups/$sigResourceGroup
115115
```
116116

0 commit comments

Comments
 (0)