From 1cef907459f01473e0ce8fa038f7b7aaf7ad0bbc Mon Sep 17 00:00:00 2001 From: Jason Masten Date: Tue, 23 Jan 2024 20:25:48 +0000 Subject: [PATCH] Updated resource prefix length to support resource names with shorter limits --- src/bicep/form/mlz.portal.json | 6 +++--- src/bicep/mlz.bicep | 4 ++-- src/bicep/mlz.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/bicep/form/mlz.portal.json b/src/bicep/form/mlz.portal.json index ad5c6b0eb..353729aac 100644 --- a/src/bicep/form/mlz.portal.json +++ b/src/bicep/form/mlz.portal.json @@ -212,13 +212,13 @@ "label": "Resource Naming Prefix", "type": "Microsoft.Common.TextBox", "defaultValue": "", - "toolTip": "Specify a prefix (min 1 and max 10 lowercase characters and numbers) to prepend to all resources.", + "toolTip": "Specify a prefix (min 3 and max 6 lowercase characters and numbers) to prepend to all resources.", "constraints": { "required": true, "validations": [ { - "regex": "^[a-z][a-z0-9]{1,9}$", - "message": "The prefix must contain alphanumeric characters, begin with a letter, letters must be lowercase, and not exceed 10 characters." + "regex": "^[a-z][a-z0-9]{1,5}$", + "message": "The prefix must contain alphanumeric characters, begin with a letter, letters must be lowercase, and the length must be between 3 to 6 characters." } ] } diff --git a/src/bicep/mlz.bicep b/src/bicep/mlz.bicep index 2563b71cd..e74186bbf 100644 --- a/src/bicep/mlz.bicep +++ b/src/bicep/mlz.bicep @@ -18,8 +18,8 @@ targetScope = 'subscription' // REQUIRED PARAMETERS @minLength(3) -@maxLength(10) -@description('A prefix, 3-10 alphanumeric characters without whitespace, used to prefix resources and generate uniqueness for resources with globally unique naming requirements like Storage Accounts and Log Analytics Workspaces') +@maxLength(6) +@description('A prefix, 3-6 alphanumeric characters without whitespace, used to prefix resources and generate uniqueness for resources with globally unique naming requirements like Storage Accounts and Log Analytics Workspaces') param resourcePrefix string @minLength(3) diff --git a/src/bicep/mlz.json b/src/bicep/mlz.json index ebac95a91..891df8fe4 100644 --- a/src/bicep/mlz.json +++ b/src/bicep/mlz.json @@ -5,16 +5,16 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "6733078488232120276" + "templateHash": "11783352289111650944" } }, "parameters": { "resourcePrefix": { "type": "string", "minLength": 3, - "maxLength": 10, + "maxLength": 6, "metadata": { - "description": "A prefix, 3-10 alphanumeric characters without whitespace, used to prefix resources and generate uniqueness for resources with globally unique naming requirements like Storage Accounts and Log Analytics Workspaces" + "description": "A prefix, 3-6 alphanumeric characters without whitespace, used to prefix resources and generate uniqueness for resources with globally unique naming requirements like Storage Accounts and Log Analytics Workspaces" } }, "resourceSuffix": {