Conversation
added 8 commits
March 13, 2023 15:48
lovelysandwich
commented
Mar 16, 2023
| Names = @("parTopLevelManagementGroupSuffix") | ||
| Value = "" | ||
| DefaultValue = "" | ||
| Valid = "^[a-zA-Z]{0,5}$" |
Contributor
Author
There was a problem hiding this comment.
Make this a function rather than a RegEx. We can have more nuanced handling of error.
We can nest the Regex validation for now - but gives us future scope for better validation.
Contributor
Author
There was a problem hiding this comment.
So I'm finding pscustomobject doesn't house functions all that well - we might need to change to genuine PS classes to get this kind of functionality...
lovelysandwich
commented
Mar 16, 2023
| ConnectivitySubscriptionId = [pscustomobject]@{ | ||
| ForEnvironment = $true | ||
| Description = "The identifier of the Connectivity subscription. (e.g '00000000-0000-0000-0000-000000000000')" | ||
| Valid = "^( {){0,1}[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(}){0,1}$" |
Contributor
Author
There was a problem hiding this comment.
This could be a common 'Validate ID or Validate Guid' validation function.
lovelysandwich
commented
Mar 17, 2023
| "Destination": "Parameters" | ||
| } | ||
| ], | ||
| "AllowedValues": [ |
Contributor
Author
There was a problem hiding this comment.
I need to find a nice way to do this dynamically - I could embed PS script in here I suppose...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Adding further CLI 'questions' to allow for configuration and deployment of ALZ.
Adding support for replacement by matching patterns in the existing ALZ bicep configuration.
Support input validation (using Regex - I'm sorry)
Adding tests (of course!)
A few fit and finish changes
(Note. This change doesn't yet address the issues with USEast DCs for Log Analytics Workspace needing to reside in a paired DC UsEast2. That will be handled in a subsequent change.) Azure/Azure-Landing-Zones#2568
License
By submitting this pull request, I confirm that my contribution is made under the terms of the projects associated license.