-
Notifications
You must be signed in to change notification settings - Fork 983
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
Policy refactoring with automation and testing #1022
Conversation
* Adds a new resource library containing individual policy definition and policy set definition resources as individual files * Adds a Bicep template used to programmatically generate a new policies.json file for the eslzArm Portal deployment * The new policies.json template is now designed to universally work across AzureCloud, AzureChinaCloud and AzureUsGovernment clouds * Adds new GitHub Action to automatically regenerate policies.json when relevant changes are detected in a PR * Adds new GitHub Action to perform static code analysis (linting) of the new src folder (also scans eslzArm folder but for reporting only) * Adds a new GitHub Action to perform automated testing of the eslzArm deployment, including a complete deployment and tear-down * Adds an updated version of the original EnterpriseScaleLibraryTools PowerShell module from the Terraform implementation, now rebranded as Alz.Tools and extended to include new functionality needed for broader use (will be re-usable for Terraform and Bicep implementations) * Adds a new GitHub Action to keep the Alz.Tools module up to date with the latest API versions * Includes minor (primarily cosmetic) updates to the eslzArm deployment to improve maintainability and control whilst running programmatically
@krowlandson I'll have a go with testing this in Azure China, will reach out when I have questions |
* Update elements in Portal UI definition to match the parameters set by their output for easier maintenance * Added logic to customize the Portal UI questions based on target Cloud environment, to improve support for `AzureChinaCloud` (_pending update to MG scope deployment_) and `AzureUSGovernment` * Improve consistency across deployment names and update to use `alz-` prefix instead of `EntScale-` * Update description field in `emailContactAsc` parameter across Cloud environments for `Deploy-MDFC-Config` Policy Assignment
6a7c4a2
to
3a9c534
Compare
I have one concern that we are using a Bicep data structure to store the configuration for the public/mc/ff policies. This should be in a common data format like JSON or YAML. I understand there is a feature request in the Bicep team for changes to a function Azure/bicep/issues/3816#issuecomment-1191230215 but they have not committed to producing this. As a workaround to this I would like us to store the data as JSON/YAML, then convert this to Bicep in the absence of working bicep function. This way we can start on the journey to have a machine readable definition for ALZ. |
This is a good idea. However, the term "workaround" doesn't sit well with me. Being honest, today, do we actually find ourselves updating the list of policies for clouds? It's more updating existing policies and the rule definitions of them. Also, by templating now and then reverting back to bicep at a later date, if the feature is added, do we think it is worth the additional engineering effort? If so, we may need you to pick this up as @krowlandson is going to be OOF over the next few weeks at different times. Or do we think we can merge this and then evolve from there with another PR later to look at templating option? This may be easier for all of us to discuss on a call 🙂 let me know if you think so and I'll find us a slot |
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.
Other than the comments previously made as well as the single comment on collisions I have no further input. Sterling work @krowlandson !
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.
Great work
Overview/Summary
This PR makes a fundamental change to the how we manage and test custom policies implemented as part of Azure landing zones.
This PR fixes/adds/changes/removes
policies.json
file for theeslzArm
Portal deploymentpolicies.json
template is now designed to universally work acrossAzureCloud
,AzureChinaCloud
andAzureUsGovernment
cloudspolicies.json
when relevant changes are detected in a PRsrc
folder (also scanseslzArm
folder but for reporting only)eslzArm
deployment, including a complete deployment and tear-downEnterpriseScaleLibraryTools
PowerShell module from the Terraform implementation, now rebranded asAlz.Tools
and extended to include new functionality needed for broader use (will be re-usable for Terraform and Bicep implementations)Alz.Tools
module up to date with the latest API versionseslzArm
deployment to improve maintainability and control whilst running programmaticallyAzureChinaCloud
(pending update to MG scope deployment) andAzureUSGovernment
alz-
prefix instead ofEntScale-
emailContactAsc
parameter across Cloud environments forDeploy-MDFC-Config
Policy AssignmentBreaking Changes
None identified
Testing Evidence
AzureCloud
See test pipelines in GitHub Actions.
policies.json
forAzureChinaCloud
policies.json
forAzureUsGovernment
Testing URLs
n/a
As part of this Pull Request I have
main
branch/docs/wiki/whats-new.md
)