provisioning-library-generation
Skill6.1k starsChanged 8 months agoMITView on GitHub
Generate new Azure.Provisioning.* libraries OR regenerate existing ones. Use when introducing a brand-new provisioning library, adding new resource types, enum values, or API versions.
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about Azure/azure-sdk-for-net
- Azure/Azurite“Add support for Blob Batch operations”GitHub · Nov 26, 2019 · 33 reactions
- microsoft/DockerTools“Cannot authenticate using DefaultAzureCredential when running in container”GitHub · Jul 5, 2022 · 27 reactions
- NixOS/nixpkgs“.NET Core tooling stops working due to `ñ` in release codename and lack of HTTP headers sanitization”GitHub · May 29, 2024 · 15 reactions
- dotnet/msbuild“Using ValueTuple with PackageReference on Azure Cloud Services”GitHub · Jul 27, 2018 · 15 reactions
- A Hacker News story“DocumentDB as not a service”Hacker News · Mar 9, 2015 · 2 points
The biggest 5 of 9 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 9
Talked about on GitHub, Bluesky and Hacker News (9 times).
On GitHub · 4
- Nov 26, 2019Add support for Blob Batch operations — Azure/Azurite33 reactions · 15 comments
- Jul 5, 2022Cannot authenticate using DefaultAzureCredential when running in container — microsoft/DockerTools27 reactions · 12 comments
- May 29, 2024.NET Core tooling stops working due to `ñ` in release codename and lack of HTTP headers sanitization — NixOS/nixpkgs15 reactions · 29 comments
- Jul 27, 2018Using ValueTuple with PackageReference on Azure Cloud Services — dotnet/msbuild15 reactions · 8 comments
On Bluesky · 4
- Nov 27, 2024📦 Azure / azure-sdk-for-net ⭐ 5,492 (+1) 🗒 C# This repository is for active development of the Azure SDK for .NET. For consumers of the… — @github-trending.bsky.social1 likes and repost
- Oct 26, 2024📦 Azure / azure-sdk-for-net ⭐ 5,378 (+2) 🗒 C# This repository is for active development of the Azure SDK for .NET. For consumers of the… — @github-trending.bsky.social1 likes and repost
- Jun 14, 2024📦 Azure / azure-sdk-for-net ⭐ 5,089 (+2) 🗒 C# This repository is for active development of the Azure SDK for .NET. For consumers of the… — @github-trending.bsky.social1 likes and repost
- Apr 30, 2024📦 Azure / azure-sdk-for-net ⭐ 4,985 (+2) This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we… — @github-trending.bsky.social1 likes and repost
On Hacker News · 1
- Mar 9, 2015DocumentDB as not a service2 points
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- agentic-workflowsSkill
- analyze-ci-failuresSkill
- auto-build-repairSkill
- azsdk-common-apiview-feedback-resolutionSkill
- azsdk-common-generate-sdk-locallySkill
- azsdk-common-pipeline-analysisSkill
- azsdk-common-pipeline-fixerSkill
- azsdk-common-prepare-release-planSkill
- azsdk-common-sdk-releaseSkill
- azure-sdk-mgmt-pr-reviewSkill
- csharp-azure-spector-coverage-gapsSkill
- dpg-migrationSkill
- find-package-skillSkill
- mgmt-review-comment-resolutionSkill
- mitigate-breaking-changesSkill
- ownersSkill
- pre-commit-checksSkill
- refresh-arm-sdk-releaseSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
37 rules. About 0 are common, 17 are distinctive, and 20 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
20
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
If sdk/{service}/Azure.Provisioning.{Service}/ already exists → Regeneration.
- Very specific: line 22
If it does NOT exist → Onboarding.
- Distinctive: line 32
Key principle: Only update the management library version if explicitly requested or if the feature doesn't exist in the current version.
- Distinctive: line 37
Check if the feature already exists in the current management library:
- Distinctive: line 42
If the feature exists → Skip version update, proceed to Step 2B
- Distinctive: line 43
If the feature doesn't exist → You'll need to update the version (proceed to Step 2A)
- Very specific: line 61
If you see a _generatedResources HashSet, add the new resource types to it:
- Distinctive: line 86
After running the generator, verify that only the target provisioning library was modified:
- Very specific: line 99
Only keep changes to Azure.Provisioning.{TargetService}/.
- Distinctive: line 103
If the generator fails with errors:
- Distinctive: line 109
Do NOT attempt to automatically fix generator errors without user guidance.
- Distinctive: line 115
When updating management library versions, compare the generated code with the previous version.
- Distinctive: line 118
If a type is removed from the management library:
- Very specific: line 119
Create a backward-compatible stub in sdk/provisioning/Azure.Provisioning.{Service}/src/BackwardCompatible/Models/
- Distinctive: line 123
If a property type changes:
- Very specific: line 128
Use CustomizeResource with GeneratePartialPropertyDefinition = true:
- Very specific: line 132
Create a partial class in BackwardCompatible/ that implements DefineAdditionalProperties() to add the old property name
- Distinctive: line 135
If enum member ordering changes (affecting implicit numeric values):
- Very specific: line 136
Use OrderEnum<T>() in the specification file to preserve the original ordering:
- Very specific: line 142
If [DataMember] attributes are removed from enums, ApiCompat will report CP0014 errors.
- Very specific: line 156
If CI fails with "Unknown word" errors, add the words to sdk/provisioning/cspell.yaml:
- Very specific: line 165
Important: Use sdk/provisioning/cspell.yaml, NOT .vscode/cspell.json.
- Very specific: line 169
Before committing, invoke the pre-commit-checks skill with the service directory set to provisioning.
- Very specific: line 173
Update the CHANGELOG at sdk/provisioning/Azure.Provisioning.{Service}/CHANGELOG.md:
- Distinctive: line 214
Ran pre-commit checks: No breaking changes (new resources only)
- Very specific: line 231
Check if the specification uses a whitelist (_generatedResources)
- Distinctive: line 232
Verify the resource types are added to the whitelist
- Distinctive: line 233
Ensure the management library version is correct
- Very specific: line 236
Ensure the management library version in eng/centralpackagemanagement/Directory.Packages.props is correct and published
- Distinctive: line 240
Use customization code to maintain backward compatibility (preferred approach):
- Very specific: line 241
Create backward-compatible stubs in BackwardCompatible/Models/
- Very specific: line 242
Use CustomizeProperty and CustomizeResource in specification files
- Very specific: line 243
Add partial classes with DefineAdditionalProperties() for property renames
- Very specific: line 244
Only [DataMember] attribute removal errors can be suppressed via the centralized XML suppression file
- Very specific: line 247
Use OrderEnum<T>() in the specification file to control ordering
- Distinctive: line 250
Check for missing using statements
- Distinctive: line 251
Check for type name conflicts
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Provisioning Library Generation
This skill covers two related generation workflows for Azure.Provisioning.* libraries:
- Onboarding — introducing a brand new
Azure.Provisioning.{Service}package. - Regeneration — updating an existing package to add new resources, enum values, or API versions.
Start here: Use Workflow Selection below to choose the correct process before doing anything else.
Workflow Selection
Is this onboarding or regeneration?
- If
sdk/{service}/Azure.Provisioning.{Service}/already exists → Regeneration. Jump to Regeneration Workflow. - If it does NOT exist → Onboarding. Read and follow
ONBOARDING.mdin this skill directory. New provisioning libraries are onboarded through the TypeSpec provisioning emitter.
Regeneration Workflow
(For existing packages — adding new resources, enum values, or API versions.)
Step 1: Determine If Management Library Version Update Is Needed
Key principle: Only update the management library version if explicitly requested or if the feature doesn't exist in the current version. Prefer not updating to reduce the amount of changes.
- If the requirement explicitly says "update the version" → Update the version (proceed to Step 2A)
- If the requirement does NOT explicitly request a version update:
- Check if the feature already exists in the current management library:
# Search for the resource/feature in the management library grep -r "NetworkSecurityPerimeterResource" sdk/{service}/Azure.ResourceManager.{Service}/ - If the feature exists → Skip version update, proceed to Step 2B
- If the feature doesn't exist → You'll need to update the version (proceed to Step 2A)
- Check if the feature already exists in the current management library:
Step 2A: Update Management Library Version (If Needed)
Edit eng/centralpackagemanagement/Directory.Packages.props to update the management library version:
<PackageVersion Include="Azure.ResourceManager.{ServiceName}" Version="{NewVersion}" />Step 2B: Check for Resource Whitelist (If Applicable)
Some specifications (like Network) use a whitelist to limit which resources are generated. Check the specification file:
cat sdk/provisioning/Generator/src/Specifications/{Service}Specification.csIf you see a _generatedResources HashSet, add the new resource types to it:
private readonly HashSet<Type> _generatedResources = new()
{
// ... existing resources ...
typeof(NetworkSecurityPerimeterResource),
typeof(NetworkSecurityPerimeterAccessRuleResource),
// ... add all related resource types ...
};Step 3: Run the Provisioning Generator
Navigate to the generator directory and run:
cd sdk/provisioning/Generator/src
dotnet run --framework net10.0 -- --filter {ServiceName}Important: The generator reads from NuGet packages, NOT local source code. The version in eng/centralpackagemanagement/Directory.Packages.props determines which package version is used.
Verify Only Target Library Changed
After running the generator, verify that only the target provisioning library was modified:
git status --short -- sdk/provisioning/The generator may regenerate other libraries (e.g., Azure.Provisioning) due to shared dependencies. Revert any changes to libraries other than the target:
# Example: If you're adding features to Azure.Provisioning.Network, revert changes to Azure.Provisioning
git checkout main -- sdk/provisioning/Azure.Provisioning/Only keep changes to Azure.Provisioning.{TargetService}/.
Generator Errors
If the generator fails with errors:
- Capture the full error output including stack traces and error messages
- Report the error to the user with enough context to understand what went wrong
- Stop and let the user decide how to proceed — generator errors often require code changes to the generator itself or the specification files, which may need human judgment
Do NOT attempt to automatically fix generator errors without user guidance.
Schema and Bicep-reference validation is handled by the dedicated provisioning PR review workflow. Do not duplicate that validation in this generation workflow.
Step 4: Handle Breaking Changes (Version Updates Only)
When updating management library versions, compare the generated code with the previous version. Common breaking changes include:
Type Removed
If a type is removed from the management library:
- Create a backward-compatible stub in
sdk/provisioning/Azure.Provisioning.{Service}/src/BackwardCompatible/Models/ - Mark it with
[EditorBrowsable(EditorBrowsableState.Never)]and[Obsolete]
Property Type Changed
If a property type changes:
- In the specification file, use
CustomizePropertyto rename the new property:CustomizeProperty("ResourceName", "PropertyName", p => p.Name = "NewPropertyName"); - Use
CustomizeResourcewithGeneratePartialPropertyDefinition = true:CustomizeResource("ResourceName", r => r.GeneratePartialPropertyDefinition = true); - Create a partial class in
BackwardCompatible/that implementsDefineAdditionalProperties()to add the old property name
Enum Ordinal Shift
If enum member ordering changes (affecting implicit numeric values):
- Use
OrderEnum<T>()in the specification file to preserve the original ordering:OrderEnum<PostgreSqlFlexibleServerVersion>("Ver15", "Ver14", "Ver13", "Ver12", "Ver11", "Sixteen");
DataMember Attribute Removed
If [DataMember] attributes are removed from enums, ApiCompat will report CP0014 errors.
For provisioning packages, add the suppression to eng/apicompatbaselines/Azure.Provisioning.{Service}.xml:
<Suppression>
<DiagnosticId>CP0014</DiagnosticId>
<Target>F:Azure.Provisioning.{Service}.{EnumType}.{Member}:[T:System.Runtime.Serialization.DataMemberAttribute]</Target>
</Suppression>Note: This centralized suppression approach is specifically supported for provisioning packages and is the only option for suppressing these particular ApiCompat errors.
Step 5: Fix Spell Check Issues
If CI fails with "Unknown word" errors, add the words to sdk/provisioning/cspell.yaml:
- filename: '**/sdk/provisioning/Azure.Provisioning.{Service}/**/*.cs'
words:
- newword1
- newword2Important: Use sdk/provisioning/cspell.yaml, NOT .vscode/cspell.json.
Step 6: Run Pre-Commit Checks
Before committing, invoke the pre-commit-checks skill with the service directory set to provisioning. This will handle code formatting, API export, and snippet updates.
Step 7: Update CHANGELOG and Commit
- Update the CHANGELOG at
sdk/provisioning/Azure.Provisioning.{Service}/CHANGELOG.md:## X.X.X-beta.X (Unreleased) ### Features Added - Added support for `{NewResource}` resources and related types. - Stage all changes and commit:
git add -A git commit -m "Add {Feature} to Azure.Provisioning.{Service}"
Example A: PostgreSQL Server Versions 17 and 18 (Version Update Required)
The requirement was to add PostgreSQL versions 17 and 18, which required updating the management library.
- Updated
eng/centralpackagemanagement/Directory.Packages.props: ChangedAzure.ResourceManager.PostgreSqlfrom 1.3.1 to 1.4.1 - Ran generator:
dotnet run --framework net10.0 -- --filter PostgreSql - Handled breaking changes: Property renames, obsolete stubs, enum ordering, ApiCompatBaseline
- Fixed CI issues: Added spell check words to
cspell.yaml - Ran pre-commit checks:
pwsh eng\scripts\CodeChecks.ps1 -ServiceDirectory provisioning
Example B: NetworkSecurityPerimeter Resources (No Version Update Needed)
The requirement was to add NetworkSecurityPerimeter support. The resources already existed in the current management library but weren't being generated due to a whitelist.
- Checked management library: Resources already existed in
Azure.ResourceManager.Network - Updated
NetworkSpecification.cs: Added 7 resource types to_generatedResources:typeof(NetworkSecurityPerimeterResource), typeof(NetworkSecurityPerimeterAccessRuleResource), typeof(NetworkSecurityPerimeterAssociationResource), typeof(NetworkSecurityPerimeterLinkResource), typeof(NetworkSecurityPerimeterLinkReferenceResource), typeof(NetworkSecurityPerimeterLoggingConfigurationResource), typeof(NetworkSecurityPerimeterProfileResource), - Ran generator:
dotnet run --framework net10.0 -- --filter Network - Ran pre-commit checks: No breaking changes (new resources only)
- Updated CHANGELOG: Documented new NetworkSecurityPerimeter support
Key Files
| File | Purpose |
eng/centralpackagemanagement/Directory.Packages.props | Management library version |
sdk/provisioning/Generator/src/Specifications/{Service}Specification.cs | Generator customizations and resource whitelist |
sdk/provisioning/Generator/src/Model/Specification.Customize.cs | Customization API (OrderEnum, CustomizeResource, etc.) |
sdk/provisioning/Azure.Provisioning.{Service}/src/BackwardCompatible/ | Backward-compatible customizations |
eng/apicompatbaselines/Azure.Provisioning.{Service}.xml | API compatibility suppressions (provisioning only) |
sdk/provisioning/cspell.yaml | Spell check configuration for provisioning |
Troubleshooting
Resources not being generated
- Check if the specification uses a whitelist (
_generatedResources) - Verify the resource types are added to the whitelist
- Ensure the management library version is correct
Generator fails to find types
- Ensure the management library version in
eng/centralpackagemanagement/Directory.Packages.propsis correct and published - Try running
dotnet restorebefore the generator
API compatibility errors
- Use customization code to maintain backward compatibility (preferred approach):
- Create backward-compatible stubs in
BackwardCompatible/Models/ - Use
CustomizePropertyandCustomizeResourcein specification files - Add partial classes with
DefineAdditionalProperties()for property renames
- Create backward-compatible stubs in
- Only
[DataMember]attribute removal errors can be suppressed via the centralized XML suppression file
Enum values in wrong order
- Use
OrderEnum<T>()in the specification file to control ordering
Build fails after regeneration
- Check for missing using statements
- Check for type name conflicts
- Review the specification customizations
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

