agentleFS
jonathan-vellajonathan-vella/bmit-2026/.github/skills/azure-bicep-patterns/SKILL.md

azure-bicep-patterns

Skill3 starsChanged 8 months agoMITArchived repositoryView on GitHub

Reusable Azure Bicep patterns: hub-spoke, private endpoints, diagnostics, AVM composition. USE FOR: Bicep template design, hub-spoke networking, private endpoint patterns, AVM modules. DO NOT USE FOR: Terraform code, architecture decisions, troubleshooting, diagram generation.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Private Endpoints: Always wire PE + DNS Zone Group + DNS Zone.

    line 51
  2. Distinctive:

    What-If: Run before every deploy; watch for unexpected deletes and SKU downgrades

    line 56
  3. Distinctive:

    AVM: Always pin versions; wrap modules to override defaults.

    line 57
  4. Very specific:

    AVM Version Fallback: When AVM version helpers are incomplete, query public MCR tag listings …

    line 58

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Azure Bicep Patterns Skill

Reusable infrastructure patterns for Azure Bicep templates. Complements iac-bicep-best-practices.instructions.md (style) and azure-defaults skill (naming, tags, regions).


Quick Reference

PatternWhen to UseReference
Hub-Spoke NetworkingMulti-workload environments with shared serviceshub-spoke-pattern
Private Endpoint WiringAny PaaS service requiring private connectivityprivate-endpoint-pattern
Diagnostic SettingsEvery deployed resource (mandatory)common-patterns
Conditional DeploymentOptional resources controlled by parameterscommon-patterns
Module CompositionBreaking main.bicep into reusable modulescommon-patterns
Managed Identity BindingAny service-to-service authenticationcommon-patterns
Budget & Cost MonitoringEvery deployment (mandatory)budget-pattern
What-If / AVM PitfallsPre-deployment validation & AVM gotchasavm-pitfalls

Canonical Example — Module Interface

// modules/storage.bicep — every module follows this contract
@description('Storage account name')
param name string
param location string
param tags object
param logAnalyticsWorkspaceName string

output resourceId string = storageAccount.id
output resourceName string = storageAccount.name
output principalId string = storageAccount.identity.?principalId ?? ''

Accept name, location, tags, logAnalyticsWorkspaceName; output resourceId, resourceName, principalId.


Key Rules Summary

  • Hub-Spoke: Hub holds shared infra; spokes peer to hub only; NSGs per subnet
  • Private Endpoints: Always wire PE + DNS Zone Group + DNS Zone; see group ID table in reference
  • Diagnostics: categoryGroup: 'allLogs' + AllMetrics; pass workspace name not ID
  • Conditional: bool params with defaults; guard outputs with ternary
  • Identity: guid() for idempotent role names; principalType: 'ServicePrincipal'; scope narrowly
  • Budget: 3 forecast thresholds (80%/100%/120%); amount and emails MUST be parameters
  • What-If: Run before every deploy; watch for unexpected deletes and SKU downgrades
  • AVM: Always pin versions; wrap modules to override defaults; verify outputs in README
  • AVM Version Fallback: When AVM version helpers are incomplete, query public MCR tag listings (mcr.microsoft.com/v2/bicep/{module}/tags/list) to discover authoritative published versions

Reference Index

FileContent
hub-spoke-pattern.mdHub-spoke VNet orchestration with peering
private-endpoint-pattern.mdPE wiring + DNS zone groups + group ID table
common-patterns.mdDiagnostics, conditional deploy, module composition, managed identity
budget-pattern.mdConsumption budget, forecast alerts, anomaly detection
avm-pitfalls.mdWhat-if interpretation, AVM gotchas, learn more links

Learn More

TopicHow to Find
AVM module catalogmicrosoft_docs_search(query="Azure Verified Modules registry Bicep")
Resource type schemamicrosoft_docs_search(query="{resource-type} Bicep template reference")

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.