Skip to content

Instantly share code, notes, and snippets.

@noelbundick
Created August 1, 2018 15:57
Show Gist options
  • Select an option

  • Save noelbundick/3b6004f4ff7e2162e2eb560de94d1caa to your computer and use it in GitHub Desktop.

Select an option

Save noelbundick/3b6004f4ff7e2162e2eb560de94d1caa to your computer and use it in GitHub Desktop.
Grant AKS service principal permissions to another resource
SPID=`az aks show -n aks -g trash1-aks --query servicePrincipalProfile.clientId -o tsv`
SUBNET_ID=`az network vnet subnet show -n default --vnet-name windevbox-vnet -g windevbox --query id -o tsv`
az role assignment create --role 'Network Contributor' --assignee $SPID --scope $SUBNET_ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment