Skip to content

Commit

Permalink
Add variables back
Browse files Browse the repository at this point in the history
  • Loading branch information
esgraham committed Sep 18, 2018
1 parent 3994299 commit 601e826
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion labs/build-application/reg-acr.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
AKS_RESOURCE_GROUP=$1
AKS_CLUSTER_NAME=$2
ACR_NAME=$3


# Get the id of the service principal configured for AKS
CLIENT_ID=$(az aks show --resource-group $AKS_RESOURCE_GROUP --name $AKS_CLUSTER_NAME --query "servicePrincipalProfile.clientId" --output tsv)
Expand All @@ -6,4 +10,4 @@ CLIENT_ID=$(az aks show --resource-group $AKS_RESOURCE_GROUP --name $AKS_CLUSTER
ACR_ID=$(az acr show --name $ACR_NAME --resource-group $AKS_RESOURCE_GROUP --query "id" --output tsv)

# Create role assignment
az role assignment create --assignee $CLIENT_ID --role Contributor --scope $ACR_ID
az role assignment create --assignee $CLIENT_ID --role Contributor --scope $ACR_ID

0 comments on commit 601e826

Please sign in to comment.