serverless-azure-functions icon indicating copy to clipboard operation
serverless-azure-functions copied to clipboard

Specifying storage account name

Open okumurays opened this issue 6 years ago • 3 comments

This is a Feature Proposal

Description

  • Storage account name generates combination of prefix, region, stage, md5 hash and suffix
  • However, many developers who use serverless-azure-functions for the first time will often run the default serverless.yaml first, which will result in the following errors:
  Error: DeploymentFailed - At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.------------------------
  DEPLOYMENT ERROR DETAILS
  ------------------------

  Conflict - {
    "error": {
      "code": "StorageAccountAlreadyTaken",
      "message": "The storage account named slswus2dev6fc3ac is already taken."
    }
  }
  • If someone is running in the same region and stage, the storage account name has already been used.
  • If we can directly specify the storage account name in serverless.yaml, it will be easy to prevent the above, so it will be very useful

Similar or dependent issues:

  • #190
  • #256

okumurays avatar Nov 29 '19 13:11 okumurays

Hi @okumurays. You absolutely can specify the storage account name in serverless.yaml. But I'm glad you pointed this out, because this is a failure in documentation on our part.

You would specify that in the provider config.

provider:
    storageAccount:
        name: {mystorageaccountname}

tbarlow12 avatar Mar 05 '20 19:03 tbarlow12

Hi @tbarlow12 .Thank you for your comment. I could specify storageaccount name in the provider config. and it worked well.

So I have added some explanations to DEPLOY.md. https://github.com/serverless/serverless-azure-functions/pull/425

Could you review when you have time?

okumurays avatar Mar 20 '20 12:03 okumurays

Can we specify the appinsight as well like storageAccount?

I want to use existing storage account which is getting used for other purposes also but getting following error.

Conflict - { "error": { "code": "StorageAccountAlreadyExists", "message": "The storage account named mdsptestconn already exists under the subscription." } } How can we use the existing storage account?

knarwari avatar Aug 03 '21 06:08 knarwari