Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

FlexConsumption Deployment AzureDevops Error #10620

Open
chrisgray94 opened this issue Nov 12, 2024 · 1 comment
Open

FlexConsumption Deployment AzureDevops Error #10620

chrisgray94 opened this issue Nov 12, 2024 · 1 comment
Labels
area: flex-consumption Items related to Flex Consumption support Needs: Triage (Functions)

Comments

@chrisgray94
Copy link

chrisgray94 commented Nov 12, 2024

  • I am using dotnet-isolated runtime and version 8.0
  • I have deployed Flex Consumption plan and app via Bicep.
  • I am using the AzureWebJobsStorage__accountname app setting and system assigned identity which I have given Storage Blob Data Contributor access to the storage account.
  • I am using vnet integration and the subnet also has access to the storage account.
  • I am using az functionapp deployment source config-zip CLI task in AzurePipelines yml file to deploy the code to the container I am using inside the deployment settings. However, the task always fails with:
    • "ERROR: Failed to fetch host key to check for function app status".

Any ideas? I do have other app settings for things like service bus which I have given access to with the identity as above.

Please find the bicep template below. I apologise if I've raised this in the wrong repository.

resource flexApp 'Microsoft.Web/sites@2023-12-01' = {
  name: appName
  kind: 'functionapp,linux'
  location: location
  tags: {
    app: app
    environment: environment
  }
  properties: {
    httpsOnly: true
    serverFarmId: flexPlan.id
    virtualNetworkSubnetId: subnetId
    siteConfig: {
      appSettings: appSettings
      minTlsVersion: '1.2'
      http20Enabled: true
      publicNetworkAccess: 'Enabled'
      cors: {
        allowedOrigins: [
          corsUrl
        ]
      }
    }
    functionAppConfig: {
      deployment: {
        storage: {
          type: 'blobContainer'
          value: 'https://${storageAccountName}.blob.${az.environment().suffixes.storage}/${storageContainerName}'
          authentication: {
            type: 'SystemAssignedIdentity'
          }
        }
      }
      scaleAndConcurrency: {
        maximumInstanceCount: numOfInstances
        instanceMemoryMB: 2048
      }
      runtime: { 
        name: runtimeName
        version: netFrameworkVersion
      }
    }
  }
  identity: {
    type: 'SystemAssigned'
  }
}

In the portal I also see this
Image

@satvu satvu added the area: flex-consumption Items related to Flex Consumption support label Nov 12, 2024
@mohaemen
Copy link

mohaemen commented Jan 21, 2025

Two things to check with vnet integration

  • You need to add Microsoft.Storage service endpoint to your virtual network, you can find it at ([your virtual network]\Settings\Service endpoints).
  • You need to register Microsoft.App service provider in your subscription, you can find it at ([your subscription]\Settings\Resource providers). Search for Microsoft.App and register it if not already.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area: flex-consumption Items related to Flex Consumption support Needs: Triage (Functions)
Projects
None yet
Development

No branches or pull requests

3 participants