I was following this tutorial to authorize my AKS cluster to have access to my ACR.
https://docs.microsoft.com/en-us/azure/aks/tutorial-kubernetes-deploy-cluster
It worked fine until I got to the role creation, which failed with this error.
az role assignment create --assignee $CLIENT_ID --role Reader --scope $ACR_ID
Resource group "abc" is redundant because scope is supplied
When I removed my cli default resource group, the command succeeded.
zsh on Mac
installed via homebrew
azure-cli (2.0.31)
acr (2.0.23)
acs (2.0.31)
advisor (0.5.1)
appservice (0.1.31)
backup (1.1.1)
batch (3.2.0)
batchai (0.2.0)
billing (0.1.8)
cdn (0.0.14)
cloud (2.0.13)
cognitiveservices (0.1.12)
command-modules-nspkg (2.0.1)
configure (2.0.15)
consumption (0.3.0)
container (0.1.22)
core (2.0.31)
cosmosdb (0.1.20)
dla (0.0.19)
dls (0.0.21)
eventgrid (0.1.12)
eventhubs (0.1.2)
extension (0.0.12)
feedback (2.1.1)
find (0.2.9)
interactive (0.3.19)
iot (0.1.19)
keyvault (2.0.21)
lab (0.0.21)
monitor (0.1.5)
network (2.0.28)
nspkg (3.0.2)
profile (2.0.22)
rdbms (0.2.1)
redis (0.2.12)
reservations (0.1.2)
resource (2.0.27)
role (2.0.22)
servicebus (0.1.2)
servicefabric (0.0.12)
sql (2.0.25)
storage (2.0.31)
vm (2.0.30)
Python location '/usr/local/opt/python/bin/python3.6'
Extensions directory '/Users/derek/.azure/cliextensions'
Python (Darwin) 3.6.5 (default, Mar 30 2018, 06:41:53)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
We have received another instance of this issue on the documentation GitHub project and I have been able to repro.
https://github.com/MicrosoftDocs/azure-docs/issues/9976
@MicahMcKittrick-MSFT / @efwe for visibility.
Currently, this is the expected behavior. When you set a default resource group, you are basically saying you want -g {default-rg} added to any commands that support it.
This is still terribly annoying
Most helpful comment
This is still terribly annoying