-
Notifications
You must be signed in to change notification settings - Fork 37
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 Azure Functions Flex Consumption #3551
Comments
@nzthiago Funny you ask, I've just created a Function App on the Flex Consumption plan using the Pulumi with the Azure Native provider and it worked perfectly. I took inspiration from the bicep sample on the Azure sample repository for Flex Consumption plan: the code looks the same, just typescript instead of bicep. The only thing needed was to use the specific version of the API where the new sections were added for the function app. I intend to publish an article on my blog with the code in a couple of days. I don't know if you would also be interested in a PR on the sample repository you have on GitHub or if you just want to keep bicep and Terraform samples there. |
Yes, this is the key. Since the functionality was recently added, it's not present in Pulumi's default API version for this resource, but you can import newer API versions. The syntax depends on your programming language, in TypeScript, for instance, it's |
Thank you both! @TechWatching just to confirm you then deployed a function to the app and it worked end to end, you saw the functions in it and was able to trigger them? I had a concern about a note I saw here that says |
Yes, I created a new function app from a template with a basic HTTP trigger that says hello world, deployed it using the func cli, and sent an HTTP message to it to make sure it ran correctly. Everything worked correctly. The documentation you mention is about the Azure Classic Provider, a different provider than the Azure Native provider (Azure Classic provider is this repository which is different from this repository. The Azure Classic provider is a bridge from Terraform AzureRM provider, so I guess that if it works fine with the Azure RM Terraform provider (which I don't know and I did not verify) it should also work with the Pulumi Azure Classic provider. I made it work with the Azure Native provider (native meaning is generated directly from the Azure APIs, and as a consequence has a similar API as Bicep and contains all the API versions). The documentation for the Azure Native provider is here, but you won't see the new properties because the documentation only displays one API version (as far as I know, it's not possible on the documentation to see all the API versions, I don't know @thomas11 if it's something planned but that's something missing). I will try to find some time very soon to publish my code to some GitHub repository and an article explaining how to implement a Function App on the Flex Consumption Plan using Azure Native provider. |
@TechWatching I used @nzthiago is working with me to figure out why in my case for example |
Here you go @davidobrien1985 👉 https://github.com/TechWatching/AzureFunctionsFlexConsumptionPlan To deploy the code, you have to be in the Function folder and run the command |
@nzthiago @davidobrien1985 And here is the blog post: https://techwatching.dev/posts/flex-consumption-plan |
@TechWatching great write up! Thank you. I think for the purpose of this feature request (support Flex Consumption in Pulumi Azure Native) it seems to already be addressed we can close this issue. By the way, support for Azure RM Terraform provider is under development, but not quite there yet. Once it's out then it seems Pulumi Azure Classic will start working too. |
Just wanted to say merci @TechWatching for taking the time to share this 💎 I also tried using
I landed here after a few hours of struggle, the AzureWebJobsStorage__accountName appSetting was the missing part, adding that fixes it. |
Removing This is not Pulumi related but just tested in Azure portal. If you look at the docs here: https://learn.microsoft.com/en-us/azure/templates/microsoft.web/sites?pivots=deployment-language-bicep#functionsruntime - it specifies: |
added link here Azure/azure-functions-host#10714 |
Hello!
Issue details
Azure Functions has recently introduced a new hosting plan, called Flex Consumption. In Flex Consumption, many of the standard application settings and site configuration properties used in Bicep, ARM templates, and overall control plane are deprecated or have moved and shouldn't be used when automating function app resource creation. This is is documented here.
This plan's SKU tier is 'FlexConsumption' and name 'FC1'. There is also a brand new
functionAppConfig
section introduced to thesite
resource.I am not sure if these changes break any existing support that Pulumi has for Azure Functions and if these changes need to be special cased for Pulumi to be used for creating Flex Consumption apps but raising this as a feature request for consideration. Happy to help with any questions on this.
The text was updated successfully, but these errors were encountered: