Azure AVM Terraform mode
Azure AVM Terraform mode是一款engineering方向的AI技能,核心价值是Create, update, or review Azure IaC in Terraform using Azure Verified Modules (AVM),可用于解决开发者在engineering领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
Create, update, or review Azure IaC in Terraform using Azure Verified Modules (AVM).
mkdir -p ./skills/azure-verified-modules-terraform && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/azure-verified-modules-terraform/SKILL.md -o ./skills/azure-verified-modules-terraform/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# Azure Verified Modules (AVM) Terraform
Overview
Azure Verified Modules (AVM) are pre-built, tested, and validated Terraform and Bicep modules that follow Azure best practices. Use these modules to create, update, or review Azure Infrastructure as Code (IaC) with confidence.
Custom Instructions for GitHub Copilot Agents
**IMPORTANT**: When GitHub Copilot Agent or GitHub Copilot Coding Agent is working on this repository, the following local unit tests MUST be executed to comply with PR checks. Failure to run these tests will cause PR validation failures:
./avm pre-commit
./avm tflint
./avm pr-checkThese commands must be run before any pull request is created or updated to ensure compliance with the Azure Verified Modules standards and prevent CI/CD pipeline failures.
More details on the AVM process can be found in the [Azure Verified Modules Contribution documentation](https://azure.github.io/Azure-Verified-Modules/contributing/terraform/testing/).
**Failure to run these tests will cause PR validation failures and prevent successful merges.**
Module Discovery
Terraform Registry
- Search for "avm" + resource name
- Filter by "Partner" tag to find official AVM modules
- Example: Search "avm storage account" → filter by Partner
Official AVM Index
> **Note:** The following links always point to the latest version of the CSV files on the main branch. As intended, this means the files may change over time. If you require a point-in-time version, consider using a specific release tag in the URL.
- **Terraform Resource Modules**: `https://raw.githubusercontent.com/Azure/Azure-Verified-Modules/refs/heads/main/docs/static/module-indexes/TerraformResourceModules.csv`
- **Terraform Pattern Modules**: `https://raw.githubusercontent.com/Azure/Azure-Verified-Modules/refs/heads/main/docs/static/module-indexes/TerraformPatternModules.csv`
- **Terraform Utility Modules**: `https://raw.githubusercontent.com/Azure/Azure-Verified-Modules/refs/heads/main/docs/static/module-indexes/TerraformUtilityModules.csv`
Terraform Module Usage
From Examples
1. Copy the example code from the module documentation
2. Replace `source = "../../"` with `source = "Azure/avm-res-{service}-{resource}/azurerm"`
3. Add `version = "~> 1.0"` (use latest available)
4. Set `enable_telemetry = true`
From Scratch
1. Copy the Provision Instructions from module documentation
2. Configure required and optional inputs
3. Pin the module version
4. Enable telemetry
Example Usage
module "storage_account" {
source = "Azure/avm-res-storage-storageaccount/azurerm"
version = "~> 0.1"
enable_telemetry = true
location = "East US"
name = "mystorageaccount"
resource_group_name = "my-rg"
# Additional configuration...
}Naming Conventions
Module Types
- **Resource Modules**: `Azure/avm-res-{service}-{resource}/azurerm`
- Example: `Azure/avm-res-storage-storageaccount/azurerm`
- **Pattern Modules**: `Azure/avm-ptn-{pattern}/azurerm`
- Example: `Azure/avm-ptn-aks-enterprise/azurerm`
- **Utility Modules**: `Azure/avm-utl-{utility}/azurerm`
- Example: `Azure/avm-utl-regions/azurerm`
Service Naming
- Use kebab-case for services and resources
- Follow Azure service names (e.g., `storage-storageaccount`, `network-virtualnetwork`)
Version Management
Check Available Versions
- Endpoint: `https://registry.terraform.io/v1/modules/Azure/{module}/azurerm/versions`
- Example: `https://registry.terraform.io/v1/modules/Azure/avm-res-storage-storageaccount/azurerm/versions`
Version Pinning Best Practices
- Use pessimistic version constraints: `version = "~> 1.0"`
- Pin to specific versions for production: `version = "1.2.3"`
- Always review changelog before upgrading
Module Sources
Terraform Registry
- **URL Pattern**: `https://registry.terraform.io/modules/Azure/{module}/azurerm/latest`
- **Example**: `https://registry.terraform.io/modules/
🎯 Best For
- Engineering teams doing code reviews
- Open source maintainers
- Claude users
- GitHub Copilot users
- AI users
💡 Use Cases
- Reviewing pull requests for security vulnerabilities
- Checking code style consistency
- Using Azure AVM Terraform mode in daily workflow
- Automating repetitive engineering tasks
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply Azure AVM Terraform mode to Your Work
Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.
- 4
Review and Refine
Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.
❓ Frequently Asked Questions
Does this skill check for OWASP Top 10?
Security-focused review skills often include OWASP checks. Check the skill content for specific vulnerability categories covered.
How do I install Azure AVM Terraform mode?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/azure-verified-modules-terraform/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Blindly accepting AI suggestions
Always verify AI-generated review comments. Some suggestions may not apply to your specific codebase conventions.
Not reading the full skill
Skills contain important context and edge cases beyond the quick start.