I'm using Azure CLI v2.0.62.
I do have multiple subscriptions - S1, S2, S3, S4 - in Azure on the single account.
I'm executing below script to insert dynamic value into repository:
az login
az acr build "ParentStorage" --platform windows -f Dockerfile -t ChildRepository:<dynamicValue>
Here, ParentStorage
is of Storage Account
type and ChileRepository
is of Repository
type.
At first, when login command gets executed, it gives me list of available subscription. But after executing az acr build...
command it is throwing error message as below:
Error
The resource with name 'ParentStorage' and type 'Microsoft.ContainerRegistry/registries' could not be found in subscription 'Visual Studio Professional (ID)'.
What I have found till now is, it is trying to search under my Visual Studio subscription (S1
). As S1
was the default subscription and repository was in S2
. So I set S2
as default subscription and tried again but it didn't work.
Event when I tried to execute below command, it threw the same error:
az acr show --name ParentStorage
P.S.: I tried to login with specific subscription but unable to do so.
Please let me know what is I'm missing here.