This directory contains lease files that establish a time-limited design discussion period for Resource Providers (RPs) in the Azure REST API specifications repository. ARM leases provide a structured timeframe for Product Managers (PMs) and RP owners to collaborate on API design, review specifications.
Important: Only Product Managers (PMs) are authorized to add lease.yaml files to this directory. Lease files should be added after conducting office hours discussions with RP owners. The reviewer field should contain the GitHub alias of a PM who has reviewed and approved the lease.
This directory is intended to be governed via CODEOWNERS to ensure proper governance:
- Product Managers (PMs): Can add and modify
lease.yamlfiles after office hours discussions with RP owners - Engineers: Can enhance and improve the validation workflow and related automation
- Approvals: All changes should be reviewed and approved by designated code owners (PMs and engineers listed in CODEOWNERS, when configured)
Adding New PMs: To grant a new PM access to add lease files, they should be added to the CODEOWNERS file for the .github/arm-leases/ directory path when CODEOWNERS protection is configured.
Each lease must be placed in the following directory structure:
.github/arm-leases/<orgName>/<rpNamespace>/[<serviceName> (optional)]/lease.yaml
<orgName>: lowercase alphanumeric only (e.g., testservice, widgetservice)<rpNamespace>: alphanumeric with dots, case-sensitive (e.g., Microsoft.TestRP, Azure.Widget)<serviceName>: (optional) customer-facing service name within an RP (e.g., DiskRP, ComputeRP). Must not start with "stable" or "preview"
The lease.yaml file must follow this format:
lease:
resource-provider: Microsoft.TestRP # Must match the rpNamespace folder name
startdate: 2026-01-07 # ISO 8601 format (YYYY-MM-DD)
duration: P180D # ISO 8601 duration (max 180 days, e.g., P180D, P90D, P5M)
reviewer: "@evanhissey" # GitHub alias of the approving reviewerCreate a file at .github/arm-leases/<orgName>/<rpNamespace>/<serviceName>(optional)/lease.yaml with the following content (replace the placeholder values):
lease:
resource-provider: <rpNamespace>
startdate: <YYYY-MM-DD>
duration: P180D
reviewer: "@your-github-alias"All lease files are automatically validated with the following requirements:
- Only
lease.yamlfiles are allowed in the.github/arm-leases/directory - Must follow the folder structure:
<orgName>/<rpNamespace>/[<serviceName> (optional)]/lease.yaml
- Must match the
<rpNamespace>folder name exactly - Example: If folder is
Microsoft.TestRP, thenresource-providermust beMicrosoft.TestRP
- Must be in ISO 8601 format:
YYYY-MM-DD - Must be a valid calendar date
- Required field that cannot be empty
- Must be a valid ISO 8601 duration (e.g.,
P180D,P90D,P5M) - Maximum duration is 180 days
- Supports day-based (
P90D), month-based (P5M), and combined formats
- Required field that cannot be empty
- Must be a GitHub alias starting with
@(e.g.,@githubUsername)
If your PR check "ARM Lease Validation" is failing, review the error messages in the check output and fix the issues in your lease.yaml file. Common causes include:
- Invalid folder structure: Ensure the path follows
<orgName>/<rpNamespace>/[<serviceName>]/lease.yamlwith lowercase org name - Resource provider mismatch: The
resource-providervalue must match the<rpNamespace>folder name exactly - Past start date: The
startdatemust be a valid date inYYYY-MM-DDformat - Invalid duration: Use a valid ISO 8601 duration that does not exceed 180 days (e.g.,
P180D,P90D,P5M) - Missing or empty fields: All fields (
resource-provider,startdate,duration,reviewer) are required - Disallowed files: Only
lease.yamlandREADME.mdfiles are permitted in.github/arm-leases/
Scripts are located in .github/arm-leases/scripts/. Run from the repository root.
Syntax:
# Without service groups
node .github/arm-leases/scripts/generate-lease-files.cjs --orgName <orgName> --rpNamespace <rpNamespace> --reviewer "@youralias" --startdate <YYYY-MM-DD> --duration <P#D>
# With service groups
node .github/arm-leases/scripts/generate-lease-files.cjs --orgName <orgName> --rpNamespace <rpNamespace> --reviewer "@youralias" --startdate <YYYY-MM-DD> --duration <P#D> --serviceName "<serviceName1>,<serviceName2>"Examples:
# Without service groups
node .github/arm-leases/scripts/generate-lease-files.cjs --orgName storage --rpNamespace Microsoft.Storage --reviewer "@johndoe" --startdate 2026-05-01 --duration P90D
# With service groups
node .github/arm-leases/scripts/generate-lease-files.cjs --orgName compute --rpNamespace Microsoft.Compute --reviewer "@janesmith" --startdate 2026-05-01 --duration P180D --serviceName "DiskRP,ComputeRP,GalleryRP"Syntax:
# Generate resource provider list (without service groups)
node .github/arm-leases/scripts/fetch-resource-providers.cjs --output <filename>
# Generate resource provider list (with service groups)
node .github/arm-leases/scripts/fetch-resource-providers.cjs --with-service-groups --output <filename>
# Generate lease files from list
node .github/arm-leases/scripts/generate-lease-files.cjs --input <filename> --reviewer "@youralias" --startdate <YYYY-MM-DD> --duration <P#D>Examples:
# RPs without service groups (e.g., Microsoft.Storage)
node .github/arm-leases/scripts/fetch-resource-providers.cjs --output rps-simple.txt
node .github/arm-leases/scripts/generate-lease-files.cjs --input rps-simple.txt --reviewer "@johndoe" --startdate 2026-04-16 --duration P180D
# RPs with service groups (e.g., Microsoft.Compute with DiskRP, ComputeRP)
node .github/arm-leases/scripts/fetch-resource-providers.cjs --with-service-groups --output rps-groups.txt
node .github/arm-leases/scripts/generate-lease-files.cjs --input rps-groups.txt --reviewer "@johndoe" --startdate 2026-04-16 --duration P180D