You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Using a custom library for custom management group structures
216
+
217
+
Azure environments may not always be aligned with the default management group structure suggested by Azure Landing Zones. In this case it is required to maintain your own version of the Azure Landing Zone library repository and make changes in there to the default structure. This will increase the overall complexity in maintaining synchronisation as you will have to manage any updates to the forked repository.
218
+
219
+
In the example below it follows a typical customer customization where instead of having a corp/online management group structure it has been elected to use a non-production/production management group structure.
220
+
221
+
The updated management group structure would follow similar to below:-
222
+
223
+
```
224
+
--Azure Landing Zones MG
225
+
|_Non-Production MG
226
+
|_ Production MG
227
+
```
228
+
229
+
1. Create a fork of the [Azure Landing Zone Library](https://github.com/Azure/Azure-Landing-Zones-Library) and clone it locally. When later running the `New-ALZPolicyDefaultStructure` and `Sync-ALZPolicyFromLibrary` commands you will need to ensure the `-LibraryPath` parameter points to this cloned repo.
230
+
2. For ALZ there are two files which need to be updated - firstly we need to add the new management group archetypes into the `\platform\alz\architecture_definitions\alz.alz_architecture_definition.json` file. In this example I will remove the `corp` and `online` entries from this file and replace them with a non-production and production key as below:-
231
+
232
+
```
233
+
{
234
+
"archetypes": [
235
+
"non-production"
236
+
],
237
+
"display_name": "Non-Production",
238
+
"exists": false,
239
+
"id": "non-production",
240
+
"parent_id": "landingzones"
241
+
},
242
+
{
243
+
"archetypes": [
244
+
"production"
245
+
],
246
+
"display_name": "Production",
247
+
"exists": false,
248
+
"id": "production",
249
+
"parent_id": "landingzones"
250
+
}
251
+
```
252
+
253
+
3. Now that the new archetypes have been added there needs to be archetype defintion files created - which tie together which assignments are associated to these archetypes. For this example we will apply the same assignments as what would have been applied to the `corp` management group to the new management groups.
254
+
4. In the forked repository in the folder `\platform\alz\archetype_definitions` we can copy the `corp.alz_archetype_definition.json` file twice and rename it to `non-production.alz_archetype_definition.json` and `production.alz_archetype_definition.json`. For each file update the `name` key in the file to match e.g.
5. Since the `corp` and `online` archetypes no longer exist I can rename the archetype files for these with a `.bak` extension so the sync script does not include them.
274
+
6. The new structure file can now be generated - for example:-
8. There are now two new folders in the `policyAssignments\ALZ` folder as below, and looking at the assigned scope for the assignments we can see they are going to be assigned to the correct management group.
9. When maintaining parity with updates from the ALZ team including policy changes and new assignments it will be necessary to sync your forked repo and carefully check the incoming changes.
0 commit comments