Describe the bugng add @azure/ng-deploy automatically chooses a storage account name based on the project name when the user initializes it and signs in. Sometimes, that storage account name can conflict with an existing storage account (the name must be globally unique).
Initialization does not immediately make the user aware that they do not own the storage account in question, and the init fails silently. The user is told:
Account {{StorageAccountName}} already exist on subscription, using existing account.
In my case, the storage account name in question was not mine (and not in any of my subscriptions). I am working from an existing code sample.
When the user attempts to deploy the application (ng deploy), the following error is displayed:
The resource 'Microsoft.Storage/storageAccounts/{{StorageAccountName}}' under resource group '{{ResourceGroup}}' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
To Reproduce
Steps to reproduce the behavior:
Choose a project name that causes a conflict with an existing storage account name. For example, name your project angular9-todo-app, so that initializing ng-deploy will set it up to connect to the existing storage account angular9todoappstatic. Make sure that storage account is not owned/accessible by you.
add ng-deploy with ng add @azure/ng-deploy
sign in
(storage account and other dependencies are created automatically)
✔ Creating resource group {{ResourceGroup}} at West US (westus)
Account {{StorageAccountName}} already exist on subscription, using existing account
CREATE azure.json (410 bytes)
UPDATE angular.json (5475 bytes
Deploy the app with ng deploy
Preparing for deployment
Error when trying to deploy:
The Resource 'Microsoft.Storage/{{StorageAccountName}}' under resource group '{{ResourceGroup}}' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Expected behavior
Either of the following behaviours would be nice:
create a storage account with a unique name, e.g., a UUID so there are no conflicts
To fail clearly at the initialization stage, when ng-deploy is added and the user signs in.
Desktop (please complete the following information):
Describe the bug
ng add @azure/ng-deploy
automatically chooses a storage account name based on the project name when the user initializes it and signs in. Sometimes, that storage account name can conflict with an existing storage account (the name must be globally unique).Initialization does not immediately make the user aware that they do not own the storage account in question, and the init fails silently. The user is told:
In my case, the storage account name in question was not mine (and not in any of my subscriptions). I am working from an existing code sample.
When the user attempts to deploy the application (
ng deploy
), the following error is displayed:To Reproduce
Steps to reproduce the behavior:
Choose a project name that causes a conflict with an existing storage account name. For example, name your project
angular9-todo-app
, so that initializingng-deploy
will set it up to connect to the existing storage accountangular9todoappstatic
. Make sure that storage account is not owned/accessible by you.add ng-deploy with
ng add @azure/ng-deploy
sign in
(storage account and other dependencies are created automatically)
Deploy the app with
ng deploy
Expected behavior Either of the following behaviours would be nice:
Desktop (please complete the following information):
Additional context N/A