# TFNFR34 - Using Feature Toggles Module Specification for the Azure Verified Modules (AVM) program ID: TFNFR34 - Category: Code Style - Using Feature Toggles A toggle variable MUST be used to allow users to avoid the creation of a new resource block by default if it is added in a minor or patch version. E.g., our previous release was v1.2.1 and next release would be v1.3.0, now we’d like to submit a pull request which contains such new resource: resource "azurerm_route_table" "this" { location = local.location name = coalesce(var.new_route_table_name, "${var.subnet_name}-rt") resource_group_name = var.resource_group_name } A user who’s just upgraded the module’s version would be surprised to see a new resource to be created in a newly generated plan file. A better approach is adding a feature toggle to be turned off by default: variable "create_route_table" { type = bool default = false nullable = false } resource "azurerm_route_table" "this" { count = var.create_route_table ? 1 : 0 location = local.location name = coalesce(var.new_route_table_name, "${var.subnet_name}-rt") resource_group_name = var.resource_group_name } --- Source: https://raw.githubusercontent.com/Azure/Azure-Verified-Modules/refs/heads/main/docs/content/specs-defs/includes/terraform/shared/non-functional/TFNFR34.md Last Modified: 0001-01-01