quarkusio/quarkus · error · BuildException

Invalid value for , it need to match the pattern

Error message

Invalid value for <appServicePlanName>, it need to match the pattern %s

What it means

Raised by AzureFunctionsDeployCommand.validateParameters when the App Service plan name set for the deployment does not match APP_SERVICE_PLAN_NAME_PATTERN. The value is validated locally before contacting Azure; a mismatch means the plan name (from the azure-functions plugin configuration or quarkus.azure-functions.app-service-plan.name) contains characters Azure's App Service plan naming rules disallow, and the message interpolates the expected pattern.

Solutions

  1. Adjust the App Service plan name to satisfy the pattern shown in the message
  2. Check the azure-functions-maven-plugin <appServicePlanName> or Gradle extension configuration for typos and illegal characters
  3. If the plan already exists in Azure, use its exact existing name
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at extensions/azure-functions/deployment/src/main/java/io/quarkus/azure/functions/deployment/AzureFunctionsDeployCommand.java:183 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/8502487ea503d176. Report an issue: GitHub.

Appendix: source

Thrown at extensions/azure-functions/deployment/src/main/java/io/quarkus/azure/functions/deployment/AzureFunctionsDeployCommand.java:183

    protected void validateParameters(AzureFunctionsConfig config, String appName) throws BuildException {
        // app name
        if (StringUtils.isBlank(appName)) {
            throw new BuildException(EMPTY_APP_NAME);
        }
        if (appName.startsWith("-") || !appName.matches(APP_NAME_PATTERN)) {
            throw new BuildException(format(INVALID_APP_NAME, appName));
        }
        // resource group
        if (StringUtils.isBlank(config.resourceGroup())) {
            throw new BuildException(EMPTY_RESOURCE_GROUP);
        }
        if (config.resourceGroup().endsWith(".") || !config.resourceGroup().matches(RESOURCE_GROUP_PATTERN)) {
            throw new BuildException(INVALID_RESOURCE_GROUP_NAME);
        }
        // asp name & resource group
        if (StringUtils.isNotEmpty(config.appServicePlanName())
                && !config.appServicePlanName().matches(APP_SERVICE_PLAN_NAME_PATTERN)) {
            throw new BuildException(format(INVALID_SERVICE_PLAN_NAME, APP_SERVICE_PLAN_NAME_PATTERN));
        }
        if (config.appServicePlanResourceGroup().isPresent()
                && StringUtils.isNotEmpty(config.appServicePlanResourceGroup().orElse(null))
                &&
                (config.appServicePlanResourceGroup().orElse(null).endsWith(".")
                        || !config.appServicePlanResourceGroup().orElse(null).matches(RESOURCE_GROUP_PATTERN))) {
            throw new BuildException(INVALID_SERVICE_PLAN_RESOURCE_GROUP_NAME);
        }
        // slot name
        /*
         * if (deploymentSlotSetting != null && StringUtils.isEmpty(deploymentSlotSetting.getName())) {
         * throw new BuildException(EMPTY_SLOT_NAME);
         * }
         * if (deploymentSlotSetting != null && !deploymentSlotSetting.getName().matches(SLOT_NAME_PATTERN)) {
         * throw new BuildException(String.format(INVALID_SLOT_NAME, SLOT_NAME_PATTERN));
         * }
         *
         */

View on GitHub (pinned to e1c734241f)