# 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/). --- Source: awesome-copilot (github/awesome-copilot) https://github.com/github/awesome-copilot/blob/cb64ad12e32737ae764becd6885462e9b4c7cb00/agents/azure-verified-modules-terraform.agent.md MIT License Copyright GitHub, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.