Fix the issue by adding AzureFunctionsWebHost__hostid a sticky setting.
Add validation to avoid double entry for AzureFunctionsWebHost__hostid key in case of is already passed by the client.
Set APPINSIGHTS_SAMPLING_PERCENTAGE as sticky setting and set it to 100% for staging slot
Update azurerm provider and state file name
Motivation and context
An issue with host id collision was found. Steps to reproduce it:
Create a function so that staging function name is longer than 32 chars (i.e. ts-d-itn-consumers-01
The Function App will use the default value for AzureFunctionsWebHost__hostid, while the staging slot overrides it using staging as it is longer than 32 chars
When swapping the slots, the main one takes staging as value as well, so the two host ids collide and staging slot loses the app setting
Adding the key name in sticky setting list fixes the issue
Type of changes
[ ] Add new resources
[X] Update configuration to existing resources
[ ] Remove existing resources
Does this introduce a change to production resources with possible user impact?
[ ] Yes, users may be impacted applying this change
List of changes
Fix the issue by adding
AzureFunctionsWebHost__hostid
a sticky setting.Add validation to avoid double entry for
AzureFunctionsWebHost__hostid
key in case of is already passed by the client. SetAPPINSIGHTS_SAMPLING_PERCENTAGE
as sticky setting and set it to 100% for staging slotUpdate azurerm provider and state file name
Motivation and context
An issue with host id collision was found. Steps to reproduce it:
ts-d-itn-consumers-01
AzureFunctionsWebHost__hostid
, while the staging slot overrides it usingstaging
as it is longer than 32 charsstaging
as value as well, so the two host ids collide and staging slot loses the app settingAdding the key name in sticky setting list fixes the issue
Type of changes
Does this introduce a change to production resources with possible user impact?
Other information