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

Suggestion: Name property validation #2974

Closed
WhitWaldo opened this issue Jun 2, 2021 · 1 comment
Closed

Suggestion: Name property validation #2974

WhitWaldo opened this issue Jun 2, 2021 · 1 comment
Labels
enhancement New feature or request Needs: Triage 🔍

Comments

@WhitWaldo
Copy link

Is your feature request related to a problem? Please describe.
Azure has an awful lot of resources available to ARM and just about every one of them has a different convention for naming things, whether that be the min/max length of the name, whether it's case-sensitive or not, what characters can be used, etc.

Given that we've got Intellisense for building out each of the sections in Bicep, it'd be great to also get a visual hint of what's allowed with a build-in validator to help someone naming the resource while authoring their Bicep file.

Describe the solution you'd like
When setting the value of any "name" property, a tooltip should appear (not unlike the preview of required properties provided by scaffolding) that indicates clearly the various requirements around naming that type of resource. Additionally, as someone types, the value should be passed through regular expression validation to verify that the user is following the rules in real-time, so they don't deploy the project and are later surprised by the result.

Where possible, when using string concatenation or functions to build the names, it'd similarly be great if the string could be evaluated in advance to again check for validity (e.g. knowing that uniqueString() returns a 13-character string and verifying if it plus your other values exceeds the maximum length.

@WhitWaldo WhitWaldo added the enhancement New feature or request label Jun 2, 2021
@ghost ghost added the Needs: Triage 🔍 label Jun 2, 2021
@alex-frankel
Copy link
Collaborator

This work is tracked in #1679. This information is already in the swagger specs for a lot of resource types, so we should be able to consume that info and validate against it. From there, we'll focus on making sure all the swagger specs have their naming restrictions specified if applicable.

@ghost ghost locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Needs: Triage 🔍
Projects
None yet
Development

No branches or pull requests

2 participants