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
{{ message }}
This repository was archived by the owner on Jan 30, 2025. It is now read-only.
* Redirect subscriptoin configuration guidance to archetype authoring guide doc
* Revise instructions for creating ARM parameter files & management group id selection
THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
10
-
11
3
## Overview
12
4
13
5
Create and maintain your subscription configuration (parameter) JSON files in this directory.
14
6
15
-
The directory hierarchy is comprised of the following elements, from this directory downward:
16
-
17
-
1. A environment directory named for the Azure DevOps Org and Git Repo branch name, e.g. 'CanadaESLZ-main'.
18
-
2. The management group hierarchy defined for your environment, e.g. pubsec/Platform/LandingZone/Prod. The location of the config file represents which Management Group the subscription is a member of.
19
-
20
-
For example, if your Azure DevOps organization name is 'CanadaESLZ', you have two Git Repo branches named 'main' and 'dev', and you have top level management group named 'pubsec' with the standard structure, then your path structure would look like this:
21
-
22
-
```
23
-
/config/subscriptions
24
-
/CanadaESLZ-main <- Your environment, e.g. CanadaESLZ-main, CanadaESLZ-dev, etc.
25
-
/pubsec <- Your top level management root group name
The subscription GUID is needed by the pipeline; since it's not available in the file contents it is specified in the config file name.
38
-
39
-
The template name/type is a text fragment corresponding to a path name (or part of a path name) under the '/landingzones' top level path. It indicates which Bicep templates to run on the subscription. For example, the generic subscription path is `/landingzones/lz-generic-subscription`, so we remove the `lz-` prefix and use `generic-subscription` to specify this type of landing zone.
40
-
41
-
The deployment location is the short name of an Azure deployment location, which may be used to override the `deploymentRegion` YAML variable. The allowable values for this value can be determined by looking at the `Name` column output of the command: `az account list-locations -o table`.
7
+
Please review the [Deployment Instructions in Archetype Authoring Guide](../../docs/archetypes/authoring-guide.md#deployment-instructions) for organizing the subscription configuration JSON files into folders.
> Use the [Onboarding Guide for Azure DevOps](../onboarding/ado.md) to configure the `subscription` pipeline. This pipeline will deploy workload archetypes such as Machine Learning.
336
+
> Use the [Onboarding Guide for Azure DevOps](../onboarding/azure-devops-pipelines.md) to configure the `subscription` pipeline. This pipeline will deploy workload archetypes such as Generic Subscription, Machine Learning and Healthcare.
337
337
338
-
Parameter files for archetype deployment are configured in [config/subscription](../../config/subscriptions) folder. This folder contains JSON parameter configurations for configuring subscriptions based on an archetype through `subscription-ci` Azure DevOps Pipeline. The folder hierarchy is comprised of the following elements, from this folder downward:
338
+
Azure Resource Manager (ARM) parameters files provide deployment information to setup subscriptions. Deployment information can include `location`, `resource group names`, `resource names` and `networking`. You can find more information in [Azure Docs](https://docs.microsoft.com/azure/azure-resource-manager/templates/parameter-files) on ARM parameter files.
339
339
340
-
1. A environment folder named for the Azure DevOps Org and Git Repo branch name, e.g. 'CanadaESLZ-main'.
341
-
2. The management group hierarchy defined for your environment, e.g. `pubsec/LandingZones/Prod`. The location of the config file represents which Management Group the subscription is a member of.
340
+
These parameter files are located in [config/subscription](../../config/subscriptions) folder. This folder is configurable in `common.yml` and you can override in environment configuration files using the `subscriptionsPathFromRoot` setting. By default it is set to `config/subscriptions`.
342
341
343
-
For example, if your Azure DevOps organization name is 'CanadaESLZ', you have two Git Repo branches named 'main' and 'dev', and you have top level management group named 'pubsec' with the standard structure, then your path structure would look like this:
342
+
Immediate subfolder defines the environment which is based on Azure DevOps Organization (i.e. `CanadaESLZ`) & Git branch name (i.e. `main`), for example the subfolder will be called `CanadaESLZ-main`. You can have many environments based on Git branch names such as `CanadaESLZ-feature-1`, `CanadaESLZ-dev`, etc.
344
343
345
-
```none
346
-
/config/subscriptions
347
-
/CanadaESLZ-main <- Your environment, e.g. CanadaESLZ-main, CanadaESLZ-dev, etc.
348
-
/pubsec <- Your top level management root group name
ARM parameter files are used by `subscription-ci` Azure DevOps Pipeline when configuring subscriptions with Azure resources. The pipeline will detect environment, management group, subscription, deployment location and deployment parameters using the folder hierarchy, file name and file content.
| Environment | DevOps organization name & Git branch name |`CanadaESLZ-main`|
356
+
| Management Group | Calculated based on concatenating the folder hierarchy under `config/subscription/CanadaESLZ-main` | pubsecLandingZonesDevTest (without the `/`). [See below for details](#management-group-id-detection).
357
+
| Subscription | Part of the file name |`8c6e48a4-4c73-4a1f-9f95-9447804f2c98`|
358
+
| Deployment location | Part of the file name |`canadacentral`|
359
+
| Deployment parameters | Content of the file |[See file content](../../config/subscriptions/CanadaESLZ-main/pubsec/LandingZones/DevTest/8c6e48a4-4c73-4a1f-9f95-9447804f2c98_machinelearning_canadacentral.json)|
360
+
361
+
The ARM parameter file name can be in one of two formats:
The template name/type is a text fragment corresponding to a path name (or part of a path name) under the '/landingzones' top level path. It indicates which Bicep templates to run on the subscription. For example, the machine learning path is `/landingzones/lz-machinelearning`, so we remove the `lz-` prefix and use `machinelearning` to specify this type of landing zone (archetype).
369
+
370
+
The deployment location is the short name of an Azure deployment location, which may be used to override the `deploymentRegion` YAML variable. This parameter is configurable in `common.yml` and you can also override in environment configuration files. By default it is set to `canadacentral`. The allowable values for this value can be determined by looking at the `Name` column output of the command: `az account list-locations -o table`.
371
+
372
+
### Management Group Id detection
373
+
374
+
Management Group Id must be unique within an Azure environment. Since a management group hierarchy can be up to 6 levels deep with many child management groups , it is important to ensure uniqueness across all management groups ids.
375
+
376
+
There are two approaches for achieving uniquness:
377
+
378
+
1. Use the parent management group id as the prefix for every child management group id. For example:
379
+
380
+
```none
381
+
- pubsec
382
+
- pubsecLandingZones
383
+
- pubsecLandingZonesDevTest
384
+
```
359
385
360
-
The subscription GUID is needed by the pipeline; since it's not available in the file contents, it is specified in the config file name.
386
+
In this approach, the prefix creates the natural uniqueness.
361
387
362
-
The template name/type is a text fragment corresponding to a path name (or part of a path name) under the '/landingzones' top level path. It indicates which Bicep templates to run on the subscription. For example, the machine learning path is `/landingzones/lz-machinelearning`, so we remove the `lz-` prefix and use `machinelearning` to specify this type of landing zone.
388
+
2. Create a management group hierarchy where every management group id can be unique and it is manually checked. For example:
389
+
390
+
```none
391
+
- pubsec
392
+
- LandingZones
393
+
- DevTest
394
+
```
395
+
396
+
In this approach, you must ensure all management group ids are unique yourself.
397
+
398
+
The `subscription-ci` management group detection logic is built to accommodate both scenarios.
399
+
400
+
**To support approach #1:**
401
+
402
+
- Folder structure in `config/subscription/` is created without including the prefixes. For example:
403
+
404
+
```none
405
+
config/subscription/CanadaESLZ-main
406
+
- pubsec
407
+
- LandingZones
408
+
- DevTest
409
+
```
410
+
411
+
- `subscription-ci` will then take the folder structure and concatenate it to create the management group id. In this example `DevTest` management group id will be `pubsecLandingZonesDevTest`.
412
+
413
+
**To support approach #2:**
414
+
415
+
- Folder structure in `config/subscription/` should be flat. For example:
416
+
417
+
```none
418
+
config/subscription/CanadaESLZ-main
419
+
- pubsec
420
+
- LandingZones
421
+
- DevTest
422
+
```
363
423
364
-
The deployment location is the short name of an Azure deployment location, which may be used to override the `deploymentRegion` YAML variable. The allowable values for this value can be determined by looking at the `Name` column output of the command: `az account list-locations -o table`.
424
+
- `subscription-ci` will then take the folder name as the structure (since there aren't any sub folders). In this example `DevTest` management group id will be `DevTest`.
0 commit comments