0

Is there a way to tell the tool what field name in my local.settings.json file I want to update when fetching a connection string? so specifically, when I run this command:

func azure storage fetch-connection-string $STORAGE_ACCOUNT_NAME

by default, it grabs the name of my storage account (mystorage123) and appends "_STORAGE" to it. So you end up with something like this:

{
  "IsEncrypted": false,
  "Values": {
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "mystorage123_STORAGE": "DefaultEndpointsProtocol=https;AccountName=mystorage123;AccountKey=<key>"
  },
  "ConnectionStrings": {}
}

I would like it just to create a json field / key that just matches the actual account name - in this case "mystorage123". Is there a way to do this? I know I can write powershell code to update my json file manually. But it'd be better if I can just tell the command what to call the field.

Thanks.

dot
  • 14,928
  • 41
  • 110
  • 218

1 Answers1

0

I would like it just to create a json field / key that just matches the actual account name - in this case "mystorage123". Is there a way to do this? I know I can write powershell code to update my json file manually. But it'd be better if I can just tell the command what to call the field.

I don’t think there is such a way. This connection string is originally been spliced.

Cindy Pau
  • 13,085
  • 1
  • 15
  • 27