azure-functions-host icon indicating copy to clipboard operation
azure-functions-host copied to clipboard

Environment variable WEBSITE_OWNER_NAME changed in Azure Functions on Consumption Flex plan

Open Bataran opened this issue 1 year ago • 0 comments

Is your question related to a specific version? If so, please specify:

Tested on Node.js 20x on Consumpltion Flex plan

What language does your question apply to? (e.g. C#, JavaScript, Java, All)

Node.js, but most likely other languages too

Question

It seems that WEBSITE_OWNER_NAME environment variable format changed on the new Consumption Flex plan. The new format is something like this: <subscription-id>+flex-99ddf98v18fee2c3d86cb4d0f37573099297d5124520437bfa4ee00d9fc8ff8e-webspace comparing to the format on the old Consumption plan: <subscription-id>+<resource-group>-<region>webspace-Linux

Since the variable is not publicly documented it's expected to change, but still it was the only way to get resource group from within the function (without fetching it from other sources).

The question is: should we expect to have the new format also in the old Consumption plan (not Flex)? If yes, will users have some other way to obtain resource group within the function as also the WEBSITE_RESOURCE_GROUP is missing in both Consumption and Consumption Flex plans?

Bataran avatar Aug 30 '24 09:08 Bataran