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

Support for load_balancing_mode in web apps and functions #13728

Closed
adamyager opened this issue Oct 13, 2021 · 3 comments
Closed

Support for load_balancing_mode in web apps and functions #13728

adamyager opened this issue Oct 13, 2021 · 3 comments

Comments

@adamyager
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

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

  • azurerm_XXXXX

Potential Terraform Configuration

load_balancing_mode = = azurerm_ilb_mode.example.name

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

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

@tombuildsstuff
Copy link
Contributor

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 tombuildsstuff added this to the v3.0.0 milestone Oct 14, 2021
@adamyager
Copy link
Author

@tombuildsstuff
I do appreciate the thoughtful note.
there is a significant use case for my company for this feature and Functions. I do not see that as a beta offering, but perhaps this is not true.
If there is no beta for Functions, and it does not have some of the same legacy issues as web app, would you be open to at least consider adding it to functions as there may not be a medium term solution in this Area at all?

@github-actions
Copy link

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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants