スキル一覧に戻る
johnlokerse

converting-bicep-to-avm

by johnlokerse

This repository contains agent modes, prompt files and SKILLS for Azure Bicep

5🍴 1📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: converting-bicep-to-avm description: Converts raw Bicep resource definitions to Azure Verified Modules (AVM). Use when user asks to convert to AVM, replace resources with modules, use verified modules, or modernize bicep templates.

Converting Bicep to AVM Skill

Before Converting

Call Bicep:list_avm_metadata MCP tool to get available Azure Verified Modules and their versions.

Conversion Workflow

  1. Identify resources — List all resource declarations in the template
  2. Find AVM matches — Call Bicep:list_avm_metadata, match by resource type
  3. Map properties — Translate resource properties to AVM parameters
  4. Generate module — Create module declaration with registry reference
  5. Update references — Replace resource.property with module.outputs.property
  6. Validate — Lint the Bicep template and afterwards run bicep build to verify syntax
  7. Fix errors — If build fails, review error, fix mapping, return to step 6

AVM Module Reference Format

module <symbolicName> 'br/public:avm/res/<provider>/<resource>:<version>' = {
  name: '<deploymentName>'
  params: {
    name: <resourceName>
    location: <location>
    // AVM-specific parameters
  }
}

Common Resource Type Mappings

Resource TypeAVM Module Path
Microsoft.KeyVault/vaultsavm/res/key-vault/vault
Microsoft.Storage/storageAccountsavm/res/storage/storage-account
Microsoft.Web/sitesavm/res/web/site
Microsoft.Compute/virtualMachinesavm/res/compute/virtual-machine
Microsoft.Network/virtualNetworksavm/res/network/virtual-network
Microsoft.ContainerRegistry/registriesavm/res/container-registry/registry
Microsoft.Sql/serversavm/res/sql/server

⚠️ Always call Bicep:list_avm_metadata for current modules and versions. This table is for reference only and may be outdated.

Property Mapping Guidelines

Common Patterns

Raw ResourceAVM Parameter
properties.sku.nameskuName
properties.sku.tierOften bundled in skuName
tagstags (same)
locationlocation (same)
namename (same)
properties.accessPoliciesaccessPolicies (flattened)

AVM Adds Common Features

AVM modules often include built-in support for:

  • Diagnostic settings (diagnosticSettings)
  • Role assignments (roleAssignments)
  • Private endpoints (privateEndpoints)
  • Locks (lock)
  • Tags (tags)

Handling No AVM Match

If no AVM module exists:

  1. Keep the raw resource definition
  2. Add comment: // TODO: No AVM module available for <resourceType>
  3. Check for pattern modules (avm/ptn/*) as alternatives

Output Transformation

Before:

output keyVaultUri string = keyVault.properties.vaultUri

After:

output keyVaultUri string = keyVaultModule.outputs.uri

Note: AVM output names differ from raw properties — check module documentation.

Conversion Report Format

## AVM Conversion: [filename]

### Converted
| Resource | AVM Module | Version |
|----------|------------|---------|
| keyVault | avm/res/key-vault/vault | 0.11.0 |

### Not Converted
| Resource | Reason |
|----------|--------|
| customResource | No AVM module available |

### Manual Review Required
- [ ] Verify parameter mappings
- [ ] Update output references
- [ ] Test deployment

スコア

総合スコア

45/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です