Skip to main content
subagent official · GitHub

Azure AVM Terraform mode — GitHub Copilot subagent

Create, change, and review Azure Terraform code with Azure Verified Modules. Use it for infrastructure tasks and AVM repository checks.

Install into GitHub Copilot · Manually: put the files in place All methods and platforms ↓
.github/agents/azure-verified-modules-terraform.agent.md
Open on GitHub

What Azure AVM Terraform mode does

The subagent helps find AVM modules for Terraform and use them through official examples or provisioning instructions. It accounts for module and provider versions, inputs and outputs, telemetry, and AzureRM requirements. For Azure guidance, it can use microsoft.docs.mcp and azure_get_deployment_best_practices.

After edits, it should run terraform fmt and terraform validate. In an AVM repository, run ./avm pre-commit, ./avm tflint, and ./avm pr-check before creating or updating a pull request. Skipping those checks causes pull request validation to fail in that repository.

What it helps with

  • find an AVM module for an Azure resource
  • build Terraform configuration from an AVM example
  • check module and provider versions
  • run AVM checks before a pull request

Example prompts for the agent

  • Create Terraform configuration for this Azure resource using a suitable AVM module.
  • Review this Terraform code, check its inputs and module version, then run terraform fmt and terraform validate.
  • Prepare these AVM repository changes for a pull request and run ./avm pre-commit, ./avm tflint, and ./avm pr-check.

How to install Azure AVM Terraform mode

Manually: put the files in place

.github/agents/azure-verified-modules-terraform.agent.md

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about Azure AVM Terraform mode

How do I install Azure AVM Terraform mode in GitHub Copilot?

Add the agent file to your repository at .github/agents/azure-verified-modules-terraform.agent.md.

What does Azure AVM Terraform mode do?

It helps create, update, and review Azure Terraform code that uses Azure Verified Modules. It follows AVM guidance and can consult Azure documentation tools.

Which checks should I run before a pull request in an AVM repository?

Run ./avm pre-commit, followed by ./avm tflint and ./avm pr-check. Run terraform fmt and terraform validate after making changes as well.

Source text

azure-verified-modules-terraform.agent.md · MIT
---
description: "Create, update, or review Azure IaC in Terraform using Azure Verified Modules (AVM)."
name: "Azure AVM Terraform mode"
tools: ["changes", "codebase", "edit/editFiles", "extensions", "fetch", "findTestFiles", "githubRepo", "new", "openSimpleBrowser", "problems", "runCommands", "runTasks", "runTests", "search", "searchResults", "terminalLastCommand", "terminalSelection", "testFailure", "usages", "vscodeAPI", "microsoft.docs.mcp", "azure_get_deployment_best_practices", "azure_get_schema_for_Bicep"]
---

# Azure AVM Terraform mode

Use Azure Verified Modules for Terraform to enforce Azure best practices via pre-built modules.

## Discover modules

- Terraform Registry: search "avm" + resource, filter by Partner tag.
- AVM Index: `https://azure.github.io/Azure-Verified-Modules/indexes/terraform/tf-resource-modules/`

## Usage

- **Examples**: Copy example, replace `source = "../../"` with `source = "Azure/avm-res-{service}-{resource}/azurerm"`, add `version`, set `enable_telemetry`.
- **Custom**: Copy Provision Instructions, set inputs, pin `version`.

## Versioning

- Endpoint: `https://registry.terraform.io/v1/modules/Azure/{module}/azurerm/versions`

## Sources

- Registry: `https://registry.terraform.io/modules/Azure/{module}/azurerm/latest`
- GitHub: `https://github.com/Azure/terraform-azurerm-avm-res-{service}-{resource}`

## Naming conventions

- Resource: Azure/avm-res-{service}-{resource}/azurerm
- Pattern: Azure/avm-ptn-{pattern}/azurerm
- Utility: Azure/avm-utl-{utility}/azurerm

## Best practices

- Pin module and provider versions
- Start with official examples
- Review inputs and outputs
- Enable telemetry
- Use AVM utility modules
- Follow AzureRM provider requirements
- Always run `terraform fmt` and `terraform validate` after making changes
- Use `azure_get_deployment_best_practices` tool for deployment guidance
- Use `microsoft.docs.mcp` tool to look up Azure service-specific guidance

## 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:

```bash
./avm pre-commit
./avm tflint
./avm pr-check
```

These 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/).

© github · MIT · github/awesome-copilot

Similar subagents

All subagents for DevOps and infrastructure →

From the same set861

The whole set →
CAST Imaging Impact Analysis Agent This subagent assesses code change risks and ripple effects using CAST Imaging. It maps affected dependencies and helps design targeted test scenarios. ★ 40,418repo stars Blueprint Mode Executes strict workflows (Debug, Express, Main, Loop) to deliver clean fixes without guesses or conversational fluff. Best for disciplined code changes. ★ 40,418repo stars Bicep Planning Bicep Planning builds a structured Azure Bicep implementation plan and saves it as Markdown. Use it before creating infrastructure resources and configuration. ★ 40,418repo stars Bicep Specialist Writes Azure Bicep templates following Azure Verified Modules and best practices. Use it when setting up Azure infrastructure to automate linting, formatting, and validation. ★ 40,418repo stars Azure AVM Bicep mode Creates, updates, and reviews Azure Bicep IaC using Azure Verified Modules. Helps configure cloud resources according to verified Microsoft practices. ★ 40,418repo stars Azure Smart City IoT Architect Designs Azure IoT and smart city platform architectures with mandatory verification of Azure IoT Edge documentation before recommending edge components. ★ 40,418repo stars Azure SaaS Architect mode instructions Configures an AI assistant into an Azure SaaS architect for multitenant platforms. Focuses on tenant isolation, scale units, and Well-Architected SaaS patterns. ★ 40,418repo stars Azure Principal Architect mode instructions A GitHub Copilot subagent that reviews Azure architecture against the five Well-Architected Framework pillars and pulls current Microsoft guidance. ★ 40,418repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor