Github Action Deployment of Azure Function Without Public Access from All Networks

A question about Github Action Deploying Azure Function which is in VNet

I have:

  1. GitHub Repo + Action for deployment with Publish Profile
  2. Azure Function that is a part of the VNet/Subnet/NSG

Works: I am able to deploy the function only if I enable full public access for the function.

Need: I would like to restrict that so that I would not need to have public access for the deployment.

Problem: I am not able to allow Github Action on IP/Service whitelist or VNet

I do not really want a function to be publicly available all the time. Switching public access on and off for the deployment does not feel right.

Any suggestions?

5

Error: Failed to fetch Kudu App Settings. Ip Forbidden (CODE: 403)

To resolve this error, add the below application settings in the Function app=>Settings=>Environment Variables:

WEBSITE_VNET_ROUTE_ALL=1
WEBSITE_CONTENTOVERVNET=1

I have enabled access restrictions in the function app by selecting Enabled from selected virtual networks and ip addresses and add a rule to enable VNET access:

Able to deploy the function to Azure function app with access restrictions using GitHub actions:

Portal:

Recognized by Microsoft Azure Collective

4

I went back and recreated the function by starting from the beginning with Public network access: Disabled and added the function to VNet/Subnet/NSG with the default (no changes) inbound and outbound rules. With these settings, the deployment would fail as it was mentioned in the original posting. That did not publish regardless of whether the CI/CD was set up from the function as the first step or getting the publish profile and doing everything from GitHub side. Note that since there was VNet integration, it was still possible to communicate with the Fuction from withing the VNet, but again, deployments were not possible.

As soon as I switched to Public network access: Enabled from selected virtual networks and IP addresses, without any changes to Site access and rules, the deployment went through. It still had the VNet/Subnet/NSG from earlier but now the deployment went through.

My findings:

  • Public network access: Disabled – blocks deployments
  • Public network access: Enabled from selected virtual networks and IP addresses
    allows deployments.

2

After some writing back and forth with MS Azure Support we have got the answer:

the ASP density is unhealthy so once the HealthCheck has to check it
privately as opposed to publicly it’s also able to see the state of
the instances’ minor problems and display them. Overall the ASP
density isn’t something that would affect the health of an app unless
there’s a lot of heavy apps running on it. That’s why I recommended
splitting the 12 apps that are on the original ASP and moving half
under the new ASP which should help mitigate the occurrence you’re
seeing.

As you’re running an ASP with small instances the maximum recommended
apps to run on it is 8 in order to keep a healthy environment and it
doubles with every instance size (16 for Medium and 32 for Large).

We are running 12 rather small Azure Function on the Flexible Premium Function service plan. Everything works as expected, it is only the health-checks that freak out because of the larger number of functions. I do not see us purchasing an additional ASP only to fix this issue, so we will be implementing our own health-check routine instead. Maybe we will merge some of the functions into 1 later on.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật