-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Support for load_balancing_mode in web apps and functions #13728
Comments
hey @adamyager Thanks for opening this issue. As you've mentioned, whilst Terraform has support for App Service and Function Apps today - we're currently working on new resources for both App Service and Function Apps in the upcoming version 3.0 of the Azure Provider to better represent these resources in Terraform. This support, as you've mentioned, will be in the form of the new Beta resources which will go GA in the upcoming v3.0 of the Azure Provider - and are available as an opt-in Beta today - more details can be found in the App Service Beta Resources documentation. Due to the behaviour of the Azure API changing substantially over the years, and both the API and the existing resources being implemented in a "generic" manner - that is it's possible to provision different kinds of Web App using the same resource and different payloads - accurately testing every combination of every field is challenging. Whilst we can look to add new fields to these resources, ultimately this means that each new field which gets added becomes more complex to test (particularly if it's only applicable in certain configurations). As such whilst we're trying to be pragmatic about adding new fields to these older resources (since as you've mentioned, this is a useful setting to be able to configure) - at the same time we need to determine when to feature-freeze the older resources where these are available in the newer resources. Whilst I can see there's a definite value in backporting this field - talking about this internally we believe that this field is a good example of where we'd be better not to backport this field, instead we'd recommend using the newer Beta resources here. From our side we believe these new Beta resources should be stable and have no plans to introduce breaking changes to these resources - as such these are labeled as a Beta purely as a precaution whilst we're building out the surrounding resources. Should it become necessary to introduce a breaking change to these resources this would be documented in the changelog with instructions on how to workaround this - but as mentioned this is something we're hoping to avoid. Whilst I appreciate that probably isn't the answer your looking for - as mentioned above adding new fields to the older resources is incredibly time consuming (and as seen in #13349 / #13580 can lead to regressions) - so whilst we're considering all new feature request for App Service we're focused on the newer resources which better represent the API's in Terraform. As such whilst I'd like to thank you for opening this issue, I'm going to close this for the moment as (as you've mentioned) support for this is available in the new App Service Beta Resources which will be going GA in the upcoming v3.0 of the Azure Provider. Thanks! |
@tombuildsstuff |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
For customers using App Service Environment V2 or V3, the product team has notified us that PerSiteRoundRobin has substantial benefits for most customers and use cases.
This is a feature that looks to planned for the AzureRM 3.0.0, but customers see the need and benefit today.
load_balancing_mode - (Optional) The Site load balancing. Possible values include: WeightedRoundRobin, LeastRequests, LeastResponseTime, WeightedTotalTraffic, RequestHash, PerSiteRoundRobin. Defaults to LeastRequests if omitted.
New or Affected Resource(s)
Affected Resources are 3
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/function_app
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/app_service
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/app_service_slot
Potential Terraform Configuration
load_balancing_mode = = azurerm_ilb_mode.example.name
References
You can see this implemented in the beta versions of web app and the underlying APIs are the same.
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/windows_web_app#load_balancing_mode
This was added in the 2020-12-01 API
https://docs.microsoft.com/en-us/azure/templates/microsoft.web/2020-12-01/sites?tabs=json
The text was updated successfully, but these errors were encountered: