Repository Creation Process
Important
This page is for module owners only. If you are an external contributor, skip to the contribution flow.
Important
Every repository created through this process MUST use AzAPI for every control-plane resource and supported data-plane operation. AzureRM is permitted only for a specific unsupported data-plane/non-ARM API operation under the narrow TFFR3 exception. The exception must be documented and applies only to that operation in the root module, submodules, examples, end-to-end tests, Terraform tests, fixtures, and documentation snippets.
Important
If this process is not followed exactly, it may result in your repository and any in-progress code being permanently deleted.
1. Add yourself to the Module Owners Team and Open Source orgs
If you have already completed these steps, skip to step 2.
- Open the Open Source Portal and ensure your GitHub account is linked to your Microsoft account.
- Open the Open Source Portal and ensure you are a member of the
AzureandMicrosoftorganizations. - Request access via the Azure Verified Modules (AVM) Module Contributors access package. Approval adds you to the
azure-verified-modules-module-contributorsEntra group.
Info
Until your access request is approved, you can contribute by using JIT elevation.
2. Gather repository information
Gather the following approved values from the module request issue. Repository creation uses them to initialize the root metadata.json.
| Information | Description |
|---|---|
| Module name | Format: avm-<type>-<name> (e.g. avm-res-network-virtualnetwork) |
| Module provider | Optional moduleProvider; defaults to azure |
| Module display name | Approved display name, passed as moduleDisplayName |
| Module description | Required approved description, passed as moduleDescription |
| Canonical type | Required approved ARM resource type or pattern/utility taxonomy, passed as canonicalType. Resource modules can instead supply both fields in the next row. Do not infer the value from the module name. |
| Resource provider namespace and resource type | For resource modules only, resourceProviderNamespace and resourceType together are an alternative to canonicalType (e.g. Microsoft.Network and virtualNetworks). They are not required when canonicalType is supplied. |
| Telemetry ID prefix | Optional telemetryIdPrefix. Supply the assigned identifier if the proposal has one. If you omit it, creation mints one in the fleet format 46d3xtrf.<res|ptn>.<7 lowercase hex characters> for resource and pattern modules. Never hand-pick an identifier yourself. |
| Owners | ownerGitHubHandles, a PowerShell string array of approved bare usernames or qualified @organization/team-slug entries. ownerTeam adds an approved owning team, and the legacy ownerPrimaryGitHubHandle and ownerSecondaryGitHubHandle parameters are still accepted. |
| Alternative names | Optional moduleAlternativeNames, a comma-separated string; the tooling splits it for JSON metadata |
Record every approved owner. An empty owner array is valid for an unowned module, subject to the proposal and ownership processes. Metadata does not grant access. Later ownership changes use the metadata review process.
3. Create the repository
Prerequisites:
- PowerShell 7.4 or later
- Git
- GitHub CLI
- AVM core team approval and permission to create the repository, push its contents, and edit its custom properties.
- A configured Git commit identity.
Clone and prepare
Use a trusted checkout of the repository creation tooling. Its README covers operator prerequisites, additional options, and recovery.
Set-Location $HOME
git clone "https://github.com/Azure/azure-verified-modules-tools"
Set-Location .\azure-verified-modules-tools\repository-management\repository-creationAuthenticate
gh auth login -h "github.com" -w -p "https"Run the creation script
Supply the approved canonicalType below. For a resource module, you can instead replace that entry with both resourceProviderNamespace and resourceType; pattern and utility modules require an explicit canonicalType. Supply the assigned telemetry prefix if the proposal has one; otherwise omit telemetryIdPrefix and let creation mint it for resource and pattern modules. Utility modules do not use telemetry. Do not derive telemetry identifiers from repository names or replace existing identifiers.
if (!(Test-Path -Path ".\scripts\New-Repository.ps1")) {
Write-Error "This script must be run from the repository-creation directory."
exit 1
}
$parameters = @{
moduleName = "<approved module name>"
moduleDisplayName = "<approved display name>"
moduleDescription = "<approved description>"
canonicalType = "<approved ARM resource type or taxonomy>"
ownerGitHubHandles = @("<approved individual handle>")
}
.\scripts\New-Repository.ps1 @parameters -planOnlyAdd optional entries from the table when needed, including telemetryIdPrefix when the proposal already assigns one. Keep ownerGitHubHandles as an array, such as @("first-owner", "@Azure/approved-team"), and moduleAlternativeNames as a comma-separated string.
-planOnly and -WhatIf validate the inputs and show the plan without making GitHub or filesystem changes. Review the plan, including any minted telemetry identifier, and obtain the required approval before running the same command without either switch.
Creation publishes validated root metadata in the first commit to main. If creation fails, stop and follow the recovery guidance in the tooling README before retrying.
Complete Open Source Portal Setup
The script will pause and prompt you to configure the Open Source Portal. Follow the link in the script output.
Return to the terminal and type yes to complete repository configuration.
The script creates the Azure Verified Modules GitHub App installation request.
Note
Maintain the module’s details and full owners array through metadata code-owner review. Complete the Open Source Portal, access-package, and JIT requirements separately.
4. Upgrade just-in-time access to JITv2
New repositories default to JIT v1. AVM repositories must be upgraded to JIT v2 and tied to the shared service-AVM-azure-verified-modules-module-owners rule, so that just-in-time elevation is governed centrally by the AVM team rather than by a repository-specific rule.
This is a one-off manual action in the Open Source Portal. You need Direct Owner access to the repository (configured in the previous step) to complete it.
Migrate the repository to JIT v2
- Open the repository overview on the Open Source Portal:
https://repos.opensource.microsoft.com/orgs/Azure/repos/<module name>. - In the right-hand sidebar, find the Improved Just-in-time (
New) panel and click Next. - Review the concepts (Rule Version, Rule, Tie) and click Next.
- Leave Require approval for elevation selected and click Upgrade
<module name>now.
This migrates the repository to JIT v2 and creates a temporary repository-scoped starter rule. Reload the page and confirm the Just-in-time elevation section now shows JIT version: JIT v2.
Tie the repository to the shared AVM rule
- On the repository overview, click Advanced JIT options, then select Propose a new tie.
- Under Propose tying a new rule to this repository, enter the Rule ID
service-AVM-azure-verified-modules-module-ownersand click Review. - Confirm the details and click Create tie.
The tie is created in a pending approval state, so the temporary repository-scoped rule stays active until the tie is approved.
Info
The pending tie must be approved by an owner of the service-AVM-azure-verified-modules-module-owners rule (an AVM core team member). Ask the AVM core team to approve it. Once approved, just-in-time elevation for the repository is governed by the shared AVM rule and the temporary starter rule can be ignored.
Remove yourself as a Direct Owner
You were added as a Direct Owner so you could perform the JIT configuration above. Once you have finished both the JIT v2 upgrade and the shared-rule tie, remove your own account so that only jaredholgate and jatracey remain as Direct Owners.
- On the Open Source Portal, open the repository’s Compliance tab.
- Under Direct owners, remove your own account, leaving only
jaredholgateandjatracey.
Info
Module owners retain day-to-day access through the azure-verified-modules-module-owners security group and just-in-time elevation, so you do not need to remain a Direct Owner.
5. Wait for the GitHub App and repository sync
After the app is installed, repository sync applies the shared repository configuration and managed files to complete the setup.
Sync reads the root metadata.json from the module repository’s default branch for the display name and full owner list.