Switching between Azure Functions Consumption and Premium Plans with Bicep

Thomas Pentenrieder
medialesson
Published in
Jul 20, 2023

Azure Functions offer great flexibility with the consumption plan, being able to scale out and handle huge amounts of events while not costing anything if there’s no traffic. But sometimes you need even better performance or eliminate potential cold start times. That’s when it makes sense to switch to a Premium Plan, which can be achieved using Azure Bicep.

The following script shows how to swtich back and forth between a consumption plan Y1 and a premoum plan EP1 simply by passing a boolean to the module. There are some parameters for scaling that need to be set correctly for it to work, so note the comments in the Bicep file.

Bicep two switch back and forth between Consumption and Premium Plans for Azure Functions

Originally published at https://medienstudio.net on July 20, 2023.

--

--