Open ZachTB123 opened 11 months ago
Hi @ZachTB123 we're looking into it, please stand by..
Functions is not yet supported in a vnet internal enabled environmental. This feature work is in progress currently.
Is this now available?
oh! yes it is now available. You can deploy your function apps in a VNET internal enabled container app environments .Check out the blog here - https://techcommunity.microsoft.com/t5/apps-on-azure-blog/general-availability-of-azure-functions-on-azure-container-apps/ba-p/4145577
This issue is a: (mark with an x)
Issue description
I have an internal Container App environment that I am using to host my Container Apps. I would like to use this environment to host my Azure Functions. When I deploy my Azure Function to this existing environment, I get a failure message.
Steps to reproduce
@description('Resource name prefix') param resourceNamePrefix string var envResourceNamePrefix = toLower(resourceNamePrefix)
/ ###################################################################### / // Create storage account for function app prereq / ###################################################################### / resource azStorageAccount 'Microsoft.Storage/storageAccounts@2021-08-01' = { name: '${envResourceNamePrefix}storage' location: location kind: 'StorageV2' sku: { name: 'Standard_LRS' } properties: { minimumTlsVersion: 'TLS1_2' } } var azStorageConnectionString = 'DefaultEndpointsProtocol=https;AccountName=${azStorageAccount.name};EndpointSuffix=${az.environment().suffixes.storage};AccountKey=${azStorageAccount.listKeys().keys[0].value}'
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' = { name: '${envResourceNamePrefix}-la' location: location properties: any({ retentionInDays: 30 features: { searchVersion: 1 } sku: { name: 'PerGB2018' } }) }
resource appInsights 'Microsoft.Insights/components@2020-02-02' = { name: '${envResourceNamePrefix}-ai' location: location kind: 'web' properties: { Application_Type: 'web' WorkspaceResourceId: logAnalyticsWorkspace.id } }
resource vnet 'Microsoft.Network/virtualNetworks@2023-04-01' = { name: '${envResourceNamePrefix}-vnet' location: location properties: { addressSpace: { addressPrefixes: [ '10.0.0.0/16' ] } } }
resource subnet 'Microsoft.Network/virtualNetworks/subnets@2023-04-01' = { name: 'default' parent: vnet properties: { addressPrefix: '10.0.0.0/24' delegations: [ { name: 'ac' properties: { serviceName: 'Microsoft.App/environments' } } ] } }
resource environment 'Microsoft.App/managedEnvironments@2023-05-01' = { name: '${envResourceNamePrefix}-env' location: location properties: { daprAIInstrumentationKey: appInsights.properties.InstrumentationKey appLogsConfiguration: { destination: 'log-analytics' logAnalyticsConfiguration: { customerId: logAnalyticsWorkspace.properties.customerId sharedKey: logAnalyticsWorkspace.listKeys().primarySharedKey } } vnetConfiguration: { infrastructureSubnetId: subnet.id internal: true } workloadProfiles: [ { name: 'Consumption' workloadProfileType: 'Consumption' } ] } }
resource azfunctionapp 'Microsoft.Web/sites@2022-09-01' = { name: '${envResourceNamePrefix}-funcapp' location: location kind: 'functionapp' properties: { name: '${envResourceNamePrefix}-funcapp' managedEnvironmentId: environment.id siteConfig: { linuxFxVersion: 'Docker|mcr.microsoft.com/azure-functions/dotnet7-quickstart-demo:1.0' appSettings: [ { name: 'AzureWebJobsStorage' value: azStorageConnectionString } { name: 'APPLICATIONINSIGHTS_CONNECTION_STRING' value: appInsights.properties.ConnectionString } ]
} }
output functionAppName string = azfunctionapp.name