Anybody know how I can do this here in Pulumi? <ht...
# azure
c
Anybody know how I can do this here in Pulumi? https://learn.microsoft.com/en-us/azure/azure-functions/functions-deploy-container-apps?tabs=acr%2Cbash&amp;pivots=programming-language-csharp#cre[…]age I can't find a resource in any of the azure-native packages that can support this (the `environment`flag). @bored-activity-40468 I deployed an existing Function App we had to Container Apps, Visual Studio was helpful here. However, I am struggling to see how I can now interact with them. It seems like the container just scales to 0 and never wakes up again. Can't I use "Scale to 0" / Consumption if I want Functions to work? I also fail to see how we can get the Function endpoints now. Similar to the "get Function URL" method one can do in the Azure Portal on each http triggered Function.
I think I got it...
Copy code
new function_apps.WebApp("reportApp", {
    name: `${reportContainerAppName}`,
    resourceGroupName: resourceGroupLinuxFunctionApp.name,
    kind: "functionapp,linux,container,azurecontainerapps",
    managedEnvironmentId: managedEnvironment.id,
...
although, doesn't seem to work
Copy code
azure-native:web/v20220901:WebApp reportApp creating (3s) error: Code="BadRequest" Message="Invalid parameter. NetFrameworkVersion is not supported for Azure Functions on Azure Container apps. Please retry the operation without NetFrameworkVersion." Details=[{"Message":"Invalid parameter. NetFrameworkVersion is not supported for Azure Functions on Azure Container apps. Please retry the operation without NetFrameworkVersion."},{"Code":"BadRequest"},{"ErrorEntity":{"Code":"BadRequest","Message":"Invalid parameter. NetFrameworkVersion is not supported for Azure Functions on Azure Container apps. Please retry the operation without NetFrameworkVersion."}}]
I'm not setting
NetFrameworkVersion
anywhere in my code. No idea where that's coming from.
so, had to set that to
""
, otherwise deployments would fail. Also, can't use managed identity to pull from ACR, wow.
b
I can look when I’m back but all our container apps stuff is behind reverse-proxy. For a function that is an http trigger, should be able to interact by forwarding the http request to the container.
dumb question but are you using the
<http://mcr.microsoft.com/azure-functions/dotnet:4|mcr.microsoft.com/azure-functions/dotnet:4>
container?
this is what our docker build looks like
As for env vars related to function apps setup when pulumi runs
The only container that has external ingress is reverse-proxy, https://github.com/microsoft/reverse-proxy