How do I deploy Azure function from Github Actions while function and its own storage public access is disabled.

Kashikar, Bhavesh 0 Reputation points
2025-01-30T07:19:35.3566667+00:00

Hello,

I have created one azure function Test-Function and its storage Test-Storage. The source code is in GitHub Repositories and it is deployed to azure using GitHub Actions YML script.

It was working till function and its storage is publicly accessible, but it has stopped working after making it private. It is cybersecurity requirement that azure resource should not be publicly accessible.

It is giving below error;

Error: Failed to deploy web package to App Service.

Ip Forbidden (CODE: 403)

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,423 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Loknathsatyasaivarma Mahali 430 Reputation points Microsoft Vendor
    2025-01-30T09:47:58.09+00:00

    Hello @Kashikar, Bhavesh,
    Greeting for the day.

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

     It seems like you are facing an issue with your Azure Function and Storage after making them private. The error message you are receiving indicates that the deployment process is being blocked due to an IP Forbidden error with a 403 code. This error is usually caused by a firewall or access restriction that is blocking the deployment process from accessing the resources.

    To resolve this issue, you need to ensure that the deployment process has the necessary permissions to access the private resources. You can do this by configuring the firewall rules and access policies for your Azure Function and Storage.

    Here are the steps you can follow to configure the firewall rules and access policies for your Azure Function and Storage:

    • Go to the Azure portal and navigate to your Azure Function and Storage accounts.
    • Click on the Networking tab and configure the firewall rules to allow access from the IP address of the deployment process.
    • Configure the access policies to allow the deployment process to access the resources.
    • Save the changes and try deploying your function again.

    To configuring Access Policies please follow the below steps

    • Go to the Azure portal and navigate to your Azure Function and Storage accounts.
    • Click on the Access keys tab.
    • Under the Key Management section, click on "Add policy".
    • Provide a name for the policy and select the permissions that you want to grant to the deployment process.
    • Click on "Add principal" and provide the object ID or email address of the deployment process and save the changes.

    If you are still facing the same issue, you can check the logs for more information on the error. You can also try deploying the function and storage accounts separately to identify which resource is causing the issue.

    Also, for your reference please check this LINK for your better understanding.

    I hope the above provided information will help you in resolving the issue if you have any further queries or concerns, please fell to free to reach out to us.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.