Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Updated resource prefix length to support resource names with shorter… #823

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/bicep/form/mlz.portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions src/bicep/mlz.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/bicep/mlz.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down