-
Notifications
You must be signed in to change notification settings - Fork 43
Improve ALZ Module CLI #2
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
Conversation
Names = @("parTopLevelManagementGroupSuffix") | ||
Value = "" | ||
DefaultValue = "" | ||
Valid = "^[a-zA-Z]{0,5}$" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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...
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}$" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a common 'Validate ID or Validate Guid' validation function.
"Destination": "Parameters" | ||
} | ||
], | ||
"AllowedValues": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to find a nice way to do this dynamically - I could embed PS script in here I suppose...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.) #3
License
By submitting this pull request, I confirm that my contribution is made under the terms of the projects associated license.