generate-azure-bicep
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill: generate-azure-bicep
技能:generate-azure-bicep
Version: 0.3.0-alpha
Purpose: Generate Azure Bicep infrastructure modules using Azure Verified Modules (AVM) and bicepparams
Author: The Forge
Last Updated: 2025-11-18
版本: 0.3.0-alpha
用途: 使用Azure验证模块(AVM)和bicepparams生成Azure Bicep基础设施模块
作者: The Forge
最后更新: 2025-11-18
Title
标题
Generate Azure Bicep - Create production-ready Bicep infrastructure modules using Azure Verified Modules with environment-specific parameters
Generate Azure Bicep - 使用Azure验证模块创建可用于生产环境的Bicep基础设施模块,并支持环境特定参数
File Structure
文件结构
forge-plugin/skills/generate-azure-bicep/
├── SKILL.md # This file - mandatory workflow
├── examples.md # Usage scenarios and examples
├── scripts/
│ └── bicep_generator.py # Helper script for Bicep generation
└── templates/
├── main-bicep-avm-template.bicep # Main Bicep using AVM
├── bicepparams-template.bicep # Parameters file template
├── wrapper-module-template.bicep # Custom wrapper for AVM module
└── README-template.md # Documentation templateforge-plugin/skills/generate-azure-bicep/
├── SKILL.md # 本文件 - 强制工作流
├── examples.md # 使用场景和示例
├── scripts/
│ └── bicep_generator.py # Bicep生成辅助脚本
└── templates/
├── main-bicep-avm-template.bicep # 基于AVM的主Bicep模板
├── bicepparams-template.bicep # 参数文件模板
├── wrapper-module-template.bicep # AVM模块自定义包装器
└── README-template.md # 文档模板Interface References
接口引用
- ContextProvider — ,
getDomainIndex("azure")getConditionalContext("azure", topic) - MemoryStore — ,
getSkillMemory("generate-azure-bicep", project)update()
Context (via ContextProvider):
- — Azure context navigation
contextProvider.getDomainIndex("azure") - — AVM concepts, usage patterns, best practices
contextProvider.getConditionalContext("azure", "azure_verified_modules") - — Bicep syntax and structure
contextProvider.getConditionalContext("azure", "azure_bicep_overview")
Memory (via MemoryStore):
- returns per-project files:
memoryStore.getSkillMemory("generate-azure-bicep", project)- — Previous Bicep configurations
bicep_config.md - — AVM modules used and versions
avm_modules.md - — Naming conventions
resource_naming.md - — Custom wrapper modules
customizations.md
- ContextProvider — ,
getDomainIndex("azure")getConditionalContext("azure", topic) - MemoryStore — ,
getSkillMemory("generate-azure-bicep", project)update()
上下文(通过ContextProvider):
- — Azure上下文导航
contextProvider.getDomainIndex("azure") - — AVM概念、使用模式、最佳实践
contextProvider.getConditionalContext("azure", "azure_verified_modules") - — Bicep语法和结构
contextProvider.getConditionalContext("azure", "azure_bicep_overview")
内存存储(通过MemoryStore):
- 返回每个项目的文件:
memoryStore.getSkillMemory("generate-azure-bicep", project)- — 之前的Bicep配置
bicep_config.md - — 使用的AVM模块及其版本
avm_modules.md - — 命名规范
resource_naming.md - — 自定义包装器模块
customizations.md
Design Requirements
设计要求
Core Functionality
核心功能
This skill must:
- Use Azure Verified Modules as the foundation for all resource deployments
- Generate main.bicep that composes AVM modules
- Create bicepparams files for each environment (development, staging, production)
- Generate custom wrapper modules when needed for project-specific requirements
- Create directory structure with modules subdirectory
.azure/bicep/ - Apply consistent naming and tagging across all resources
- Store Bicep configuration in memory for future updates
本技能必须:
- 使用Azure验证模块作为所有资源部署的基础
- 生成main.bicep来组合AVM模块
- 为每个环境创建bicepparams文件(开发、测试、生产)
- 在需要时生成自定义包装器模块以满足项目特定需求
- 创建目录结构,包含modules子目录
.azure/bicep/ - 在所有资源上应用一致的命名和标签
- 将Bicep配置存储在内存中以便未来更新
Output Requirements
输出要求
Generate a complete directory with:
.azure/bicep/- main.bicep using AVM module references
- Environment-specific .bicepparams files
- Custom wrapper modules (if needed)
- Documentation explaining module usage
- Consistent resource naming strategy
生成完整的目录,包含:
.azure/bicep/- 引用AVM模块的main.bicep
- 环境特定的.bicepparams文件
- 自定义包装器模块(如有需要)
- 说明模块用法的文档
- 一致的资源命名策略
Quality Requirements
质量要求
Generated Bicep must:
- Use latest stable AVM versions from public registry
- Follow Azure Well-Architected Framework principles
- Pin module versions for reproducibility
- Include diagnostic settings where applicable
- Apply tags consistently across all resources
- Be well-documented with parameter descriptions
生成的Bicep必须:
- 使用公共注册表中的最新稳定AVM版本
- 遵循Azure良好架构框架原则
- 固定模块版本以确保可复现性
- 在适用的地方包含诊断设置
- 在所有资源上一致地应用标签
- 具备完善的文档,包含参数说明
Prompting Guidelines
提示指南
User Questions Framework
用户问题框架
Use Socratic method to gather requirements. Ask questions in this order:
使用苏格拉底方法收集需求。按以下顺序提问:
1. Infrastructure Scope
1. 基础设施范围
Question: "What Azure resources does your application need?"
Options (can select multiple):
- Storage Account (Blob, Queue, Table)
- Function App / App Service
- Key Vault (secrets management)
- Application Insights (monitoring)
- SQL Database / Cosmos DB
- Virtual Network (VNet, subnets, NSG)
- Container Registry
- Service Bus / Event Hub
- Other resources
Follow-up: "This determines which AVM modules to use."
问题:“你的应用需要哪些Azure资源?”
选项(可多选):
- 存储账户(Blob、队列、表)
- 函数应用/应用服务
- 密钥保管库(机密管理)
- 应用洞察(监控)
- SQL数据库/Cosmos DB
- 虚拟网络(VNet、子网、NSG)
- 容器注册表
- 服务总线/事件中心
- 其他资源
跟进:“这将决定使用哪些AVM模块。”
2. Environments
2. 环境
Question: "Which environments do you need?"
Options:
- Development only
- Development + Production
- Development + Staging + Production
- Custom environments
Follow-up: "This creates environment-specific bicepparams files."
问题:“你需要哪些环境?”
选项:
- 仅开发环境
- 开发 + 生产
- 开发 + 测试 + 生产
- 自定义环境
跟进:“这将创建环境特定的bicepparams文件。”
3. Resource Naming Convention
3. 资源命名规范
Question: "What naming convention should we use for resources?"
Options:
- Standard Azure naming ()
{resource-abbr}-{environment}-{region} - Custom prefix (e.g., )
myapp-{resource}-{environment} - Project-specific pattern
- Use Azure naming tool recommendations
Follow-up: "This ensures consistent resource names across environments."
问题:“我们应该为资源使用什么命名规范?”
选项:
- 标准Azure命名()
{resource-abbr}-{environment}-{region} - 自定义前缀(例如:)
myapp-{resource}-{environment} - 项目特定模式
- 使用Azure命名工具的建议
跟进:“这确保跨环境的资源名称一致。”
4. Azure Region
4. Azure区域
Question: "Which Azure region(s) for deployments?"
Options:
- Single region for all environments
- Different regions per environment
- Multi-region deployment
Follow-up: "This sets location parameters in bicepparams files."
问题:“部署使用哪个/哪些Azure区域?”
选项:
- 所有环境使用单个区域
- 每个环境使用不同区域
- 多区域部署
跟进:“这将在bicepparams文件中设置位置参数。”
5. Deployment Scope
5. 部署范围
Question: "What deployment scope do you need?"
Options:
- Resource Group (most common)
- Subscription (for creating resource groups)
- Management Group
- Tenant
Follow-up: "This sets the targetScope in main.bicep."
问题:“你需要什么部署范围?”
选项:
- 资源组(最常见)
- 订阅(用于创建资源组)
- 管理组
- 租户
跟进:“这将在main.bicep中设置targetScope。”
6. Custom Requirements
6. 自定义需求
Question: "Do you have any custom requirements?"
Options:
- Private endpoints for resources
- Managed identities
- VNet integration
- Custom RBAC roles
- Bring your own keys (BYOK)
- Compliance requirements
Follow-up: "This determines which optional AVM parameters to configure."
问题:“你有任何自定义需求吗?”
选项:
- 资源的专用终结点
- 托管标识
- VNet集成
- 自定义RBAC角色
- 自带密钥(BYOK)
- 合规性要求
跟进:“这将决定配置哪些可选的AVM参数。”
Instructions
操作说明
Mandatory Workflow
强制工作流
IMPORTANT: Follow these steps in order. Do not skip steps.
重要提示:按顺序执行以下步骤,不要跳过任何步骤。
Step 1: Initial Analysis
步骤1:初始分析
Objective: Understand current project context
Actions:
- Identify current working directory
- Check if directory already exists
.azure/bicep/ - Check for existing Bicep files or AVM module usage
- Identify project type and deployment target
Verification: Project context understood before proceeding
目标:了解当前项目上下文
操作:
- 识别当前工作目录
- 检查目录是否已存在
.azure/bicep/ - 检查是否有现有的Bicep文件或AVM模块使用情况
- 识别项目类型和部署目标
验证:在继续之前已理解项目上下文
Step 2: Load Index Files
步骤2:加载索引文件
Objective: Understand available context and memory structure
Actions:
- Load Azure domain index via
contextProvider.getDomainIndex("azure") - Identify which context topics will be needed based on requirements
Verification: Domain index loaded, know which context topics to load next
目标:了解可用的上下文和内存结构
操作:
- 通过加载Azure域索引
contextProvider.getDomainIndex("azure") - 根据需求确定需要哪些上下文主题
验证:域索引已加载,明确接下来要加载哪些上下文主题
Step 3: Load Project Memory
步骤3:加载项目内存
Objective: Check for existing project-specific Bicep configurations
Actions:
- Determine project name from current directory or user input
- Load project memory via
memoryStore.getSkillMemory("generate-azure-bicep", project) - If memory exists, review all memory files:
- - Previous infrastructure setup
bicep_config.md - - AVM modules used and versions
avm_modules.md - - Naming conventions
resource_naming.md - - Custom wrapper modules
customizations.md
Verification: Memory loaded if exists; ready to use previous configurations
目标:检查是否存在项目特定的Bicep配置
操作:
- 从当前目录或用户输入确定项目名称
- 通过加载项目内存
memoryStore.getSkillMemory("generate-azure-bicep", project) - 如果内存存在,查看所有内存文件:
- - 之前的基础设施设置
bicep_config.md - - 使用的AVM模块及其版本
avm_modules.md - - 命名规范
resource_naming.md - - 自定义包装器模块
customizations.md
验证:如果内存存在则已加载;准备好使用之前的配置
Step 4: Load Bicep Context
步骤4:加载Bicep上下文
Objective: Load Azure Verified Modules and Bicep knowledge
Actions:
- Load AVM context via
contextProvider.getConditionalContext("azure", "azure_verified_modules") - Load Bicep overview via
contextProvider.getConditionalContext("azure", "azure_bicep_overview")
Verification: Context loaded, understand AVM patterns and Bicep syntax
目标:加载Azure验证模块和Bicep相关知识
操作:
- 通过加载AVM上下文
contextProvider.getConditionalContext("azure", "azure_verified_modules") - 通过加载Bicep概述
contextProvider.getConditionalContext("azure", "azure_bicep_overview")
验证:上下文已加载,理解AVM模式和Bicep语法
Step 5: Gather Requirements
步骤5:收集需求
Objective: Ask user Socratic questions to gather all requirements
Actions:
- Ask about infrastructure scope (which Azure resources)
- Ask about environments (dev, staging, prod)
- Ask about resource naming convention
- Ask about Azure region(s)
- Ask about deployment scope (resource group, subscription, etc.)
- Ask about custom requirements (private endpoints, managed identities, etc.)
Verification: All requirements gathered, user confirmed ready to proceed
目标:向用户提问以收集所有需求
操作:
- 询问基础设施范围(需要哪些Azure资源)
- 询问环境(开发、测试、生产等)
- 询问资源命名规范
- 询问Azure区域
- 询问部署范围(资源组、订阅等)
- 询问自定义需求(专用终结点、托管标识等)
验证:已收集所有需求,用户确认可以继续
Step 6: Design Module Structure
步骤6:设计模块结构
Objective: Plan which AVM modules to use and how to compose them
Actions:
-
Map requirements to AVM modules:
- Storage Account →
avm/res/storage/storage-account - Function App →
avm/res/web/site - Key Vault →
avm/res/key-vault/vault - (etc. for all required resources)
- Storage Account →
-
Determine module dependencies:
- Identify which modules depend on others
- Plan output sharing between modules
- Design proper ordering
-
Plan custom wrapper modules:
- Identify if any resources need custom wrappers
- Design wrapper module parameters
- Document wrapper purpose
Verification: Module structure designed, dependencies mapped
目标:规划使用哪些AVM模块以及如何组合它们
操作:
-
将需求映射到AVM模块:
- 存储账户 →
avm/res/storage/storage-account - 函数应用 →
avm/res/web/site - 密钥保管库 →
avm/res/key-vault/vault - (其他所需资源依此类推)
- 存储账户 →
-
确定模块依赖关系:
- 识别哪些模块依赖于其他模块
- 规划模块之间的输出共享
- 设计正确的顺序
-
规划自定义包装器模块:
- 识别是否有资源需要自定义包装器
- 设计包装器模块参数
- 记录包装器的用途
验证:模块结构已设计,依赖关系已映射
Step 7: Generate Bicep Structure
步骤7:生成Bicep结构
Objective: Create directory with all files
.azure/bicep/Actions:
-
Create directory structure:bash
mkdir -p .azure/bicep/modules mkdir -p .azure/docs -
Generate main.bicep:
- Set targetScope (subscription, resourceGroup, etc.)
- Define parameters for environment-agnostic values
- Reference AVM modules with pinned versions
- Pass parameters to modules
- Define outputs for resource IDs and names
-
Generate bicepparams files for each environment:
main.development.bicepparamsmain.staging.bicepparamsmain.production.bicepparams- Set environment-specific SKUs, regions, names
-
Generate custom wrapper modules (if needed):
- Create modules in
.azure/bicep/modules/ - Wrap AVM modules with project-specific defaults
- Document wrapper purpose and parameters
- Create modules in
-
Generate documentation:
- - Explains infrastructure setup
.azure/docs/infrastructure.md - Parameter descriptions
- Deployment instructions
Verification: All files created, no errors during generation
目标:创建包含所有文件的目录
.azure/bicep/操作:
-
创建目录结构:bash
mkdir -p .azure/bicep/modules mkdir -p .azure/docs -
生成main.bicep:
- 设置targetScope(订阅、resourceGroup等)
- 定义与环境无关的参数
- 引用固定版本的AVM模块
- 向模块传递参数
- 定义资源ID和名称的输出
-
为每个环境生成bicepparams文件:
main.development.bicepparamsmain.staging.bicepparamsmain.production.bicepparams- 设置环境特定的SKU、区域、名称
-
生成自定义包装器模块(如有需要):
- 在中创建模块
.azure/bicep/modules/ - 用项目特定的默认值包装AVM模块
- 记录包装器的用途和参数
- 在
-
生成文档:
- - 说明基础设施设置
.azure/docs/infrastructure.md - 参数说明
- 部署说明
验证:所有文件已创建,生成过程中无错误
Step 8: Customize Templates
步骤8:自定义模板
Objective: Populate templates with project-specific values
Actions:
-
Replace placeholders in main.bicep:
- - Project name
{{PROJECT_NAME}} - - Resource naming prefix
{{RESOURCE_PREFIX}} - - Default Azure region
{{DEFAULT_LOCATION}}
-
Replace placeholders in bicepparams:
- - Environment name
{{ENVIRONMENT}} - - Azure region
{{LOCATION}} - - Resource SKU for environment
{{SKU}}
-
Configure AVM module versions:
- Use latest stable versions from registry
- Pin to specific versions for reproducibility
- Document version choices
Verification: Templates customized with correct values
目标:用项目特定的值填充模板
操作:
-
替换main.bicep中的占位符:
- - 项目名称
{{PROJECT_NAME}} - - 资源命名前缀
{{RESOURCE_PREFIX}} - - 默认Azure区域
{{DEFAULT_LOCATION}}
-
替换bicepparams中的占位符:
- - 环境名称
{{ENVIRONMENT}} - - Azure区域
{{LOCATION}} - - 环境的资源SKU
{{SKU}}
-
配置AVM模块版本:
- 使用注册表中的最新稳定版本
- 固定到特定版本以确保可复现性
- 记录版本选择
验证:模板已用正确的值自定义
Step 9: Validate Bicep Files
步骤9:验证Bicep文件
Objective: Ensure generated Bicep is syntactically correct
Actions:
-
Validate Bicep syntax:bash
az bicep build --file .azure/bicep/main.bicep -
Validate deployment (if Azure CLI available):bash
az deployment sub validate \ --location <location> \ --template-file .azure/bicep/main.bicep \ --parameters .azure/bicep/main.development.bicepparams -
Check AVM module versions exist:bash
az bicep list-versions --module-path "br/public:avm/res/..."
Verification: No syntax errors, all modules accessible
目标:确保生成的Bicep语法正确
操作:
-
验证Bicep语法:bash
az bicep build --file .azure/bicep/main.bicep -
验证部署(如果Azure CLI可用):bash
az deployment sub validate \ --location <location> \ --template-file .azure/bicep/main.bicep \ --parameters .azure/bicep/main.development.bicepparams -
检查AVM模块版本是否存在:bash
az bicep list-versions --module-path "br/public:avm/res/..."
验证:无语法错误,所有模块均可访问
Step 10: Present Results
步骤10:呈现结果
Objective: Show user what was generated and next steps
Actions:
-
Display generated directory structure
-
List all created files with their purposes
-
Provide deployment instructions:bash
# Deploy to subscription az deployment sub create \ --location <location> \ --template-file .azure/bicep/main.bicep \ --parameters .azure/bicep/main.development.bicepparams # Or deploy to resource group az deployment group create \ --resource-group <rg-name> \ --template-file .azure/bicep/main.bicep \ --parameters .azure/bicep/main.development.bicepparams -
Explain how to update:
- Change parameters in .bicepparams files
- Update AVM module versions
- Add new resources to main.bicep
Verification: User understands what was generated and how to deploy
目标:向用户展示生成的内容和后续步骤
操作:
-
显示生成的目录结构
-
列出所有创建的文件及其用途
-
提供部署说明:bash
# 部署到订阅 az deployment sub create \ --location <location> \ --template-file .azure/bicep/main.bicep \ --parameters .azure/bicep/main.development.bicepparams # 或部署到资源组 az deployment group create \ --resource-group <rg-name> \ --template-file .azure/bicep/main.bicep \ --parameters .azure/bicep/main.development.bicepparams -
说明如何更新:
- 修改.bicepparams文件中的参数
- 更新AVM模块版本
- 向main.bicep添加新资源
验证:用户理解生成的内容以及如何部署
Step 11: Update Project Memory
步骤11:更新项目内存
Objective: Store configuration for future reference
Actions:
-
Usewith:
memoryStore.update("generate-azure-bicep", project, "bicep_config.md", content)- Deployment scope (subscription, resource group)
- Resource naming convention
- Environments configured
- Azure regions used
-
Usewith:
memoryStore.update("generate-azure-bicep", project, "avm_modules.md", content)- List all AVM modules used
- Module versions and purposes
- Module dependencies
-
Usewith:
memoryStore.update("generate-azure-bicep", project, "resource_naming.md", content)- Naming patterns for each resource type
- Examples of generated names
-
Usewith:
memoryStore.update("generate-azure-bicep", project, "customizations.md", content)- Custom wrapper modules created
- Deviations from standard AVM usage
- Special configurations
Verification: Memory files created/updated with all relevant information
目标:存储配置以供未来参考
操作:
-
使用存储:
memoryStore.update("generate-azure-bicep", project, "bicep_config.md", content)- 部署范围(订阅、资源组)
- 资源命名规范
- 已配置的环境
- 使用的Azure区域
-
使用存储:
memoryStore.update("generate-azure-bicep", project, "avm_modules.md", content)- 使用的所有AVM模块列表
- 模块版本和用途
- 模块依赖关系
-
使用存储:
memoryStore.update("generate-azure-bicep", project, "resource_naming.md", content)- 每种资源类型的命名模式
- 生成的名称示例
-
使用存储:
memoryStore.update("generate-azure-bicep", project, "customizations.md", content)- 创建的自定义包装器模块
- 与标准AVM用法的偏差
- 特殊配置
验证:内存文件已创建/更新,包含所有相关信息
Compliance Checklist
合规性检查清单
Before completing this skill, verify:
- User questions asked and answered (Step 5)
- AVM modules identified and mapped to requirements (Step 6)
- directory created with correct structure (Step 7)
.azure/bicep/ - main.bicep generated using AVM module references (Step 7)
- bicepparams files created for all environments (Step 7)
- Custom wrapper modules created if needed (Step 7)
- Documentation generated (Step 7)
- Templates customized with project-specific values (Step 8)
- Bicep files validated (syntax and deployment) (Step 9)
- Results presented to user with deployment instructions (Step 10)
- Project memory updated (Step 11)
完成本技能之前,请验证:
- 已向用户提问并得到回答(步骤5)
- 已识别AVM模块并映射到需求(步骤6)
- 已创建结构正确的目录(步骤7)
.azure/bicep/ - 已使用AVM模块引用生成main.bicep(步骤7)
- 已为所有环境创建bicepparams文件(步骤7)
- 已在需要时创建自定义包装器模块(步骤7)
- 已生成文档(步骤7)
- 已用项目特定的值自定义模板(步骤8)
- 已验证Bicep文件(语法和部署)(步骤9)
- 已向用户呈现结果并提供部署说明(步骤10)
- 已更新项目内存(步骤11)
Best Practices
最佳实践
Azure Verified Modules
Azure验证模块
- Always use AVM modules - Don't rewrite what Microsoft provides
- Pin module versions - Use specific versions, not
latest - Use public registry - for stable, tested modules
br/public:avm/... - Check module documentation - Review parameters and examples before use
- Leverage module outputs - Pass resource IDs between modules
- Apply consistent tags - Use AVM's built-in tagging support
- 始终使用AVM模块 - 不要重复编写Microsoft已提供的内容
- 固定模块版本 - 使用特定版本,而非
latest - 使用公共注册表 - 用于稳定、经过测试的模块
br/public:avm/... - 查看模块文档 - 在使用前查看参数和示例
- 利用模块输出 - 在模块之间传递资源ID
- 应用一致的标签 - 使用AVM内置的标签支持
Bicep Structure
Bicep结构
- One main.bicep - Single entry point for all environments
- Separate bicepparams - Environment-specific configurations
- Use modules directory - For custom wrapper modules only
- Document parameters - Clear descriptions for all params
- Define outputs - Make resource IDs available to callers
- Set deployment scope - Explicit declaration
targetScope
- 一个main.bicep - 所有环境的单一入口点
- 分离的bicepparams - 环境特定的配置
- 使用modules目录 - 仅用于自定义包装器模块
- 记录参数 - 所有参数都有清晰的说明
- 定义输出 - 向调用者提供资源ID
- 设置部署范围 - 显式声明
targetScope
Resource Naming
资源命名
- Follow Azure conventions - Use resource type abbreviations
- Include environment - Clear distinction between dev/staging/prod
- Use unique suffixes - for globally unique names
uniqueString() - Be consistent - Same pattern across all resources
- Document convention - Explain naming in README
- 遵循Azure规范 - 使用资源类型缩写
- 包含环境信息 - 清晰区分开发/测试/生产
- 使用唯一后缀 - 用于全局唯一名称
uniqueString() - 保持一致 - 所有资源使用相同的模式
- 记录规范 - 在README中说明命名规则
Security
安全
- Use managed identities - Avoid storing credentials
- Enable diagnostic logging - Configure in AVM modules
- Apply least privilege - RBAC via AVM parameters
- Use private endpoints - Where applicable
- Enable encryption - Use AVM's security defaults
- 使用托管标识 - 避免存储凭据
- 启用诊断日志 - 在AVM模块中配置
- 应用最小权限原则 - 通过AVM参数配置RBAC
- 使用专用终结点 - 在适用的场景
- 启用加密 - 使用AVM的安全默认值
Additional Notes
附加说明
AVM Module Registry
AVM模块注册表
Modules are referenced using:
bicep
module resource 'br/public:avm/res/{provider}/{type}:{version}' = {
// ...
}模块引用格式:
bicep
module resource 'br/public:avm/res/{provider}/{type}:{version}' = {
// ...
}Finding Modules
查找模块
- Browse: https://aka.ms/avm
- Search: Use resource type (e.g., "storage account")
- CLI:
az bicep list-versions --module-path "br/public:avm/..."
- 浏览:https://aka.ms/avm
- 搜索:使用资源类型(例如“storage account”)
- CLI:
az bicep list-versions --module-path "br/public:avm/..."
Updating Modules
更新模块
- Check new versions:
az bicep list-versions ... - Review changelog for breaking changes
- Update version in main.bicep
- Test deployment in dev environment
- Promote to staging/production
- 检查新版本:
az bicep list-versions ... - 查看变更日志以了解破坏性变更
- 在main.bicep中更新版本
- 在开发环境中测试部署
- 推广到测试/生产环境
Custom Wrappers
自定义包装器
Create wrappers only when:
- Need project-specific defaults
- Combining multiple AVM modules
- Adding custom logic on top of AVM
Otherwise, use AVM modules directly.
仅在以下情况创建包装器:
- 需要项目特定的默认值
- 组合多个AVM模块
- 在AVM之上添加自定义逻辑
否则,请直接使用AVM模块。
Version History
版本历史
v1.1.0 (2025-07-15)
v1.1.0 (2025-07-15)
- Phase 4 Migration: Replaced hardcoded and
../../context/paths with ContextProvider and MemoryStore interface calls../../memory/ - Added YAML frontmatter with context/memory declarations
- Added Interface References section
- 第4阶段迁移:将硬编码的和
../../context/路径替换为ContextProvider和MemoryStore接口调用../../memory/ - 添加了包含上下文/内存声明的YAML前置元数据
- 添加了接口引用部分
v1.0.0 (2025-11-18)
v1.0.0 (2025-11-18)
Initial Release
- Complete Bicep generation using Azure Verified Modules
- Support for all common Azure resources
- Multi-environment support with bicepparams
- Custom wrapper module generation
- Resource naming convention support
- Memory system for configuration tracking
- Comprehensive context for AVM usage
初始发布
- 使用Azure验证模块完成Bicep生成
- 支持所有常见的Azure资源
- 支持多环境,使用bicepparams
- 自定义包装器模块生成
- 资源命名规范支持
- 用于配置跟踪的内存系统
- 关于AVM使用的全面上下文