Skip to content

Ability to refine RegEx / provide options to make more specific #9

Description

@donhaji

Is your feature request related to a problem? Please describe.
Feature Request.
The RegEx generated in the Reference section seems to generic and is far better to be broken down into options that match specific lookups for resources e.g.

Example: uks-dev-glb-hub-lvm-1
ComponentsLocation:UK South (uks)
Environment:Development (dev)
ProjAppSvc:Global Devops (glb)
Subscriptions:Hub Gateway (hub)
Type:Compute/virtualMachines (lvm)
Instance:001
RegEx
^(?!.[.]$)(?!.-$)[^\/\[\]:|<>\+=;,\?@&_\*]{1,64}$

The Regex is too generic and will match almost any resource.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Either some more generated patterns that hardcode in specific details e.g.
RegEx Patterns

Global
^(?!.[.]$)(?!.-$)[^\/\[\]:|<>\+=;,\?@&_\*]{1,64}$
Specific
^\w{1,3}-\w{1,3}-\w{1,3}-\w{1,3}-lvm-01 (or alternative regex)

Describe alternatives you've considered
Alternatives is to create the specific RegEx manually.

Additional context
Devops PIpelines can help utilise the regex better when using multiple Landing Zones with standard approach to naming. E.g. Subscriptions
Landing Zone A
Landing Zone B
Landing Zone C

All Landing Zones have similar if not the same resources with potentially the same name. Having RegEx patterns when using Az Devops allows for better pipeline templating and control over resource generation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions