Tags

br/innofactor:avm/res/resources/tags:0.1.1

Overview

Azure Resource Tagging Module

This module provides a standardized way to manage resource tags at both the subscription and resource group levels. It ensures consistency in tagging strategies across deployments, enabling better governance, cost management, and operational tracking.

Features Implemented

  • Subscription-Level Tagging: Apply tags directly to an Azure subscription.
  • Resource Group Tagging: Assign tags to a specific resource group within a subscription.
  • Tag Merging (Optional): Instead of overwriting existing tags, merge new ones with existing ones.

Default Behavior

By default, the module applies tags at the subscription level. If a resource group is specified, the tags will be assigned at that level instead. Tags are applied using an incremental deployment strategy, ensuring minimal disruption.

Customization

The module supports flexible customization via parameters:

  • Tag Scope: Choose between subscription or resource group-level tagging.
  • Tagging Strategy: Merge new tags with existing ones or replace them.
  • Telemetry Control: Enable or disable telemetry for tracking module usage.
  • Location Configuration: Optionally specify a deployment location.

Quick Start

Simply add the following snippet to your Bicep file to use the module. The examples in this documentation will explore the various parameters available.

module resourceTags 'br/innofactor:avm/res/resources/tags:<version>' = {
  name: 'resourceTags'
  scope: subscription()
  params: {
    tags: {
      Environment: 'Production'
      Owner: 'DevOpsTeam'
    }
    onlyUpdate: false
  }
}

Parameters

NameTypeRequiredDefaultDescription
enableTelemetryboolNotrueOptional. Enable/Disable usage telemetry for module.
locationstringNo"[deployment().location]"Optional. Location for all Resources.
onlyUpdateboolNofalseOptional. Instead of overwriting the existing tags, combine them with the new tags.
resourceGroupNamestringNo""Optional. Name of the Resource Group to assign the tags to. If no Resource Group name is provided, and Subscription ID is provided, the module deploys at subscription level, therefore assigns the provided tags to the subscription.
subscriptionIdstringNo"[subscription().id]"Optional. Subscription ID of the subscription to assign the tags to. If no Resource Group name is provided, the module deploys at subscription level, therefore assigns the provided tags to the subscription.
tagsobjectNoOptional. Tags of the resource.

Outputs

NameTypeDescription
namestringThe name of the tags resource.
resourceIdstringThe resource ID of the applied tags.
tagsobjectThe applied tags.

Changelog

No changelog has been published for this module yet. See the version history below.

Version history

VersionPublished
0.1.12026-11-09
0.1.02025-02-13