Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 2.27 KB

File metadata and controls

48 lines (33 loc) · 2.27 KB
description Azure Verified Modules (AVM) and Terraform
applyTo **/*.terraform, **/*.tf, **/*.tfvars, **/*.tfstate, **/*.tflint.hcl, **/*.tf.json, **/*.tfvars.json

Azure Verified Modules (AVM) Terraform

This repository uses Azure Verified Modules (AVM) for Terraform. For detailed guidance on module development, refer to the avm-terraform-module-development skill.

AVM Specifications

The authoritative source for every AVM rule (Bicep, Terraform, shared) is the spec index:

  • Index of all specs and docs (raw markdown URLs): https://azure.github.io/Azure-Verified-Modules/llms.txt
  • Rendered docs site: https://azure.github.io/Azure-Verified-Modules/

When a spec ID is mentioned (e.g. TFFR3, RMFR4, SNFR1), fetch llms.txt once, look up the raw markdown URL for that ID, and read the current text. Do not cite a spec from memory.

Module Discovery

  • Terraform Registry: Search for "avm" + resource name, filter by "Partner" tag
  • Terraform Resource Modules Index: https://azure.github.io/Azure-Verified-Modules/indexes/terraform/tf-resource-modules/
  • Terraform Pattern Modules Index: https://azure.github.io/Azure-Verified-Modules/indexes/terraform/tf-pattern-modules/

Module Naming Conventions

  • Resource Modules: Azure/avm-res-{service}-{resource}/azurerm
  • Pattern Modules: Azure/avm-ptn-{pattern}/azurerm
  • Utility Modules: Azure/avm-utl-{utility}/azurerm
  • Use kebab-case for services and resources
  • Follow Azure service names (e.g., storage-storageaccount, network-virtualnetwork)

Module Usage

When using AVM modules:

  1. Pin to a specific version: version = "1.2.3"
  2. Map enable telemetry to root variable: enable_telemetry = var.enable_telemetry
  3. For providers, use pessimistic constraints: version = "~> 1.0"
  4. Start from official examples in the module documentation
  5. Replace source = "../../" with the registry source when copying examples

Module Sources

  • Registry: https://registry.terraform.io/modules/Azure/{module}/azurerm/latest
  • GitHub: https://github.com/Azure/terraform-azurerm-avm-{type}-{service}-{resource}
  • Versions API: https://registry.terraform.io/v1/modules/Azure/{module}/[azurerm|azure]/versions