Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to publish Azure Function from VSCode NOT using storage key? #4304

Open
frankchen76 opened this issue Oct 13, 2024 · 3 comments
Open

How to publish Azure Function from VSCode NOT using storage key? #4304

frankchen76 opened this issue Oct 13, 2024 · 3 comments
Milestone

Comments

@frankchen76
Copy link

frankchen76 commented Oct 13, 2024

After I disabled my storage account's "Storage account key access" setting for a company compliance, I cannot publish an Azure Function from VSCode via right click Func->click "deploy to function app" from Azure Function extension. it complained that "Key based authentication is not permitted on this storage account" which is understandable because this setting is disabled. I already configured my user account to access storage account via RBAC and Azure Function to access storage account using managed Id which work fine. But how can I tell Azure Function VSCode extension to use my account for deployment instead of using storage key used by default? I used a consumption plan based on a Linux host and Azure Function is developed by using a TypeScript template. Thanks

@hossam-nasr
Copy link
Contributor

Hi @frankchen76 , thanks for bringing this to our attention! Could you share your Function App's local.settings.json file? Please sanitize any connection strings or identifying information before you do. Also, this storage account in question, is it being used for AzureWebJobsStorage or for some other storage binding?

@frankchen76
Copy link
Author

Hi @hossam-nasr, the AzureWebJobsStorage value is configured as a default value in local.settings.json. the default value is ok to connect to my local storage simulator. Do I need to update it? If I do, how to debug locally? Thanks

{
    "IsEncrypted": false,
    "Values": {
        "AzureWebJobsStorage": "UseDevelopmentStorage=true",
        "FUNCTIONS_WORKER_RUNTIME": "node"
    }
}```

@alexweininger
Copy link
Member

Currently there's no way to do this in VS Code using the extension. We're currently working supporting deploying while access to the storage account is through RBAC.

@motm32 motm32 added this to the 1.17.0 milestone Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants