claranet / terraform-azurerm-function-app

Terraform module for Azure Function App
Apache License 2.0
15 stars 29 forks source link

fix: disable always-on for elastic premium plans #4

Closed kevin-fitlg closed 1 year ago

kevin-fitlg commented 1 year ago

This PR disables always_on feature on Elastic Premium SKUs, in addition to consumption plans, as it is not supported;

Basically you will get a vague error about "server returned error" if we enable always_on for those SKUs. However, when you enable debug log, it is visible that such a setting is not accepted by Azure RM APIs.

This issue is also mentioned here: https://medium.com/@pihikj/azure-do-not-enable-alwayson-on-elastic-premium-plan-bb2eca010fb4

Additionally, the current module assumes the service plan to exist in the same resource group as the function app, which is not always the case, specially when the service plan is created outside of this module. So, it is better to extract the resource group name from the full service_plan_id.

Type of change

Changes proposed in this pull request

@claranet/fr-azure-reviewers

kevin-fitlg commented 1 year ago

Hey @BzSpi I also pushed another commit with regards to resource group name of the service plan. Please review again. Thanks

kevin-fitlg commented 1 year ago

Lets merge and tag a release :)

kevin-fitlg commented 1 year ago

Hi team Is it possible to get a release tag on this? Thanks