The length of the Azure function app name

ukitdog
2 min readMay 1, 2022

--

Updated at 03MAY2022

The issue still here at SDK v4 ( https://github.com/Azure/azure-functions-host/wiki/Host-IDs#host-id-collisions )

# TL;DR

The Azure function app core only supports 32 char. Any resource name exceeding 32 char will be trimmed in version 3 SDK.

e.g. my-function-app-aaaaaaa11111111111 equals my-function-app-aaaaaaa2222222

Background

We currently provision the resource via the Terraform azure provider 2.99 The function app resource name only has 60 length limit

  • name - (Required) Specifies the name of the Function App. Changing this forces a new resource to be created.

In this case, we do create something with function-app-my-demo-react-backend which is 35 for the total character.

The result of any naming from the Function app exceeding 32 char, any child resources based on this function app like the storage account or URL will be generated with a naming truncation.

Impact

If we have a company-wide naming style for the azure resource from the audit team or enforced by the infrastructure team or even a Terraform linter. Those resources might not be able to boost up as we do not know the naming limit from the Azure Terraform provider side.

Resolution

Do not blindly trust the Terraform provider able to check all the issues and always check the Azure document for any naming restriction.

Here is the page we can take a look https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules

# Reference

  1. https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftweb
  2. https://github.com/Azure/azure-functions-host/issues/2015
  3. https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/function_app#argument-reference

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

ukitdog
ukitdog

No responses yet

Write a response