From 77b0cd178378e7c0dd0e202416c8f96c4712d3b5 Mon Sep 17 00:00:00 2001 From: Kris Baranek <20225789+krbar@users.noreply.github.com> Date: Sat, 18 Apr 2026 22:49:00 +0200 Subject: [PATCH 1/3] feat: publish child modules of avm/res/insights/component --- avm/res/insights/component/CHANGELOG.md | 10 +++++ .../linked-storage-account/CHANGELOG.md | 13 ++++++ .../linked-storage-account/README.md | 27 ++++++++++++ .../linked-storage-account/main.bicep | 22 ++++++++++ .../linked-storage-account/main.json | 31 +++++++++++++- .../linked-storage-account/version.json | 4 ++ avm/res/insights/component/main.bicep | 3 ++ avm/res/insights/component/main.json | 41 ++++++++++++++++--- 8 files changed, 144 insertions(+), 7 deletions(-) create mode 100644 avm/res/insights/component/linked-storage-account/CHANGELOG.md create mode 100644 avm/res/insights/component/linked-storage-account/version.json diff --git a/avm/res/insights/component/CHANGELOG.md b/avm/res/insights/component/CHANGELOG.md index 8e66200cc3f..12c6fbd5246 100644 --- a/avm/res/insights/component/CHANGELOG.md +++ b/avm/res/insights/component/CHANGELOG.md @@ -2,6 +2,16 @@ The latest version of the changelog can be found [here](https://github.com/Azure/bicep-registry-modules/blob/main/avm/res/insights/component/CHANGELOG.md). +## 0.7.2 + +### Changes + +- Publishing child module `linked-storage-account` + +### Breaking Changes + +- None + ## 0.7.1 ### Changes diff --git a/avm/res/insights/component/linked-storage-account/CHANGELOG.md b/avm/res/insights/component/linked-storage-account/CHANGELOG.md new file mode 100644 index 00000000000..cd064f94c6a --- /dev/null +++ b/avm/res/insights/component/linked-storage-account/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +The latest version of the changelog can be found [here](https://github.com/Azure/bicep-registry-modules/blob/main/avm/res/insights/component/linked-storage-account/CHANGELOG.md). + +## 0.1.0 + +### Changes + +- Initial version + +### Breaking Changes + +- None diff --git a/avm/res/insights/component/linked-storage-account/README.md b/avm/res/insights/component/linked-storage-account/README.md index 2776f8730ad..b0c87282846 100644 --- a/avm/res/insights/component/linked-storage-account/README.md +++ b/avm/res/insights/component/linked-storage-account/README.md @@ -2,11 +2,20 @@ This component deploys an Application Insights Linked Storage Account. +You can reference the module as follows: +```bicep +module component 'br/public:avm/res/insights/component/linked-storage-account:' = { + params: { (...) } +} +``` +For examples, please refer to the [Usage Examples](#usage-examples) section. + ## Navigation - [Resource Types](#Resource-Types) - [Parameters](#Parameters) - [Outputs](#Outputs) +- [Data Collection](#Data-Collection) ## Resource Types @@ -28,6 +37,12 @@ This component deploys an Application Insights Linked Storage Account. | :-- | :-- | :-- | | [`appInsightsName`](#parameter-appinsightsname) | string | The name of the parent Application Insights instance. Required if the template is used in a standalone deployment. | +**Optional parameters** + +| Parameter | Type | Description | +| :-- | :-- | :-- | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable/Disable usage telemetry for module. | + ### Parameter: `storageAccountResourceId` Linked storage account resource ID. @@ -42,6 +57,14 @@ The name of the parent Application Insights instance. Required if the template i - Required: Yes - Type: string +### Parameter: `enableTelemetry` + +Enable/Disable usage telemetry for module. + +- Required: No +- Type: bool +- Default: `True` + ## Outputs | Output | Type | Description | @@ -49,3 +72,7 @@ The name of the parent Application Insights instance. Required if the template i | `name` | string | The name of the Linked Storage Account. | | `resourceGroupName` | string | The resource group the agent pool was deployed into. | | `resourceId` | string | The resource ID of the Linked Storage Account. | + +## Data Collection + +The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the [repository](https://aka.ms/avm/telemetry). There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at . You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices. diff --git a/avm/res/insights/component/linked-storage-account/main.bicep b/avm/res/insights/component/linked-storage-account/main.bicep index 4239327d7dd..0c14146ca51 100644 --- a/avm/res/insights/component/linked-storage-account/main.bicep +++ b/avm/res/insights/component/linked-storage-account/main.bicep @@ -7,6 +7,28 @@ param appInsightsName string @description('Required. Linked storage account resource ID.') param storageAccountResourceId string +@description('Optional. Enable/Disable usage telemetry for module.') +param enableTelemetry bool = true + +#disable-next-line no-deployments-resources +resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableTelemetry) { + name: '46d3xbcp.res.insights-component-linkedstoracct.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name), 0, 4)}' + properties: { + mode: 'Incremental' + template: { + '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' + contentVersion: '1.0.0.0' + resources: [] + outputs: { + telemetry: { + type: 'String' + value: 'For more information, see https://aka.ms/avm/TelemetryInfo' + } + } + } + } +} + resource appInsights 'Microsoft.Insights/components@2020-02-02' existing = { name: appInsightsName } diff --git a/avm/res/insights/component/linked-storage-account/main.json b/avm/res/insights/component/linked-storage-account/main.json index 6fa07c11dbb..cac7e8000ef 100644 --- a/avm/res/insights/component/linked-storage-account/main.json +++ b/avm/res/insights/component/linked-storage-account/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.41.2.15936", - "templateHash": "18407373523862927704" + "version": "0.42.1.51946", + "templateHash": "12204106674143308958" }, "name": "Application Insights Linked Storage Account", "description": "This component deploys an Application Insights Linked Storage Account." @@ -22,9 +22,36 @@ "metadata": { "description": "Required. Linked storage account resource ID." } + }, + "enableTelemetry": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Optional. Enable/Disable usage telemetry for module." + } } }, "resources": [ + { + "condition": "[parameters('enableTelemetry')]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2024-03-01", + "name": "[format('46d3xbcp.res.insights-component-linkedstoracct.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name), 0, 4))]", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } + } + } + }, { "type": "microsoft.insights/components/linkedStorageAccounts", "apiVersion": "2020-03-01-preview", diff --git a/avm/res/insights/component/linked-storage-account/version.json b/avm/res/insights/component/linked-storage-account/version.json new file mode 100644 index 00000000000..f077f1c7fe8 --- /dev/null +++ b/avm/res/insights/component/linked-storage-account/version.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", + "version": "0.1" +} diff --git a/avm/res/insights/component/main.bicep b/avm/res/insights/component/main.bicep index 27cdc32f949..561e34d016f 100644 --- a/avm/res/insights/component/main.bicep +++ b/avm/res/insights/component/main.bicep @@ -141,6 +141,8 @@ var formattedRoleAssignments = [ }) ] +var enableReferencedModulesTelemetry = false + #disable-next-line no-deployments-resources resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableTelemetry) { name: '46d3xbcp.res.insights-component.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}' @@ -187,6 +189,7 @@ module linkedStorageAccount 'linked-storage-account/main.bicep' = if (!empty(lin params: { appInsightsName: appInsights.name storageAccountResourceId: linkedStorageAccountResourceId ?? '' + enableTelemetry: enableReferencedModulesTelemetry } } diff --git a/avm/res/insights/component/main.json b/avm/res/insights/component/main.json index 027d17f1c57..e79ec9918a7 100644 --- a/avm/res/insights/component/main.json +++ b/avm/res/insights/component/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.41.2.15936", - "templateHash": "5312459819645101981" + "version": "0.42.1.51946", + "templateHash": "6182125553791029195" }, "name": "Application Insights", "description": "This component deploys an Application Insights instance." @@ -458,7 +458,8 @@ "Application Insights Component Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ae349356-3a1b-4a5e-921d-050484c6347e')]", "Application Insights Snapshot Debugger": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '08954f03-6346-4c2e-81c0-ec3a5cfae23b')]", "Monitoring Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '749f88d5-cbae-40b8-bcfc-e573ddc772fa')]" - } + }, + "enableReferencedModulesTelemetry": false }, "resources": { "avmTelemetry": { @@ -597,6 +598,9 @@ }, "storageAccountResourceId": { "value": "[coalesce(parameters('linkedStorageAccountResourceId'), '')]" + }, + "enableTelemetry": { + "value": "[variables('enableReferencedModulesTelemetry')]" } }, "template": { @@ -605,8 +609,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.41.2.15936", - "templateHash": "18407373523862927704" + "version": "0.42.1.51946", + "templateHash": "12204106674143308958" }, "name": "Application Insights Linked Storage Account", "description": "This component deploys an Application Insights Linked Storage Account." @@ -623,9 +627,36 @@ "metadata": { "description": "Required. Linked storage account resource ID." } + }, + "enableTelemetry": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Optional. Enable/Disable usage telemetry for module." + } } }, "resources": [ + { + "condition": "[parameters('enableTelemetry')]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2024-03-01", + "name": "[format('46d3xbcp.res.insights-component-linkedstoracct.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name), 0, 4))]", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } + } + } + }, { "type": "microsoft.insights/components/linkedStorageAccounts", "apiVersion": "2020-03-01-preview", From 6bba6923159b764253542bb2747aae7d4ce6e3e3 Mon Sep 17 00:00:00 2001 From: Kris Baranek <20225789+krbar@users.noreply.github.com> Date: Tue, 19 May 2026 00:20:20 +0200 Subject: [PATCH 2/3] AVM-RES: Update resource group description in outputs - Updated the description for the resource group output in the Application Insights Linked Storage Account module to clarify it refers to the Linked Storage Account. - Updated metadata version and template hash for consistency across files. --- .../component/linked-storage-account/README.md | 4 ++-- .../component/linked-storage-account/main.bicep | 2 +- .../component/linked-storage-account/main.json | 6 +++--- avm/res/insights/component/main.json | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/avm/res/insights/component/linked-storage-account/README.md b/avm/res/insights/component/linked-storage-account/README.md index b0c87282846..e7d9976b4db 100644 --- a/avm/res/insights/component/linked-storage-account/README.md +++ b/avm/res/insights/component/linked-storage-account/README.md @@ -21,7 +21,7 @@ For examples, please refer to the [Usage Examples](#usage-examples) section. | Resource Type | API Version | References | | :-- | :-- | :-- | -| `microsoft.insights/components/linkedStorageAccounts` | 2020-03-01-preview | | +| `microsoft.insights/components/linkedStorageAccounts` | 2020-03-01-preview | | ## Parameters @@ -70,7 +70,7 @@ Enable/Disable usage telemetry for module. | Output | Type | Description | | :-- | :-- | :-- | | `name` | string | The name of the Linked Storage Account. | -| `resourceGroupName` | string | The resource group the agent pool was deployed into. | +| `resourceGroupName` | string | The resource group the Linked Storage Account was deployed into. | | `resourceId` | string | The resource ID of the Linked Storage Account. | ## Data Collection diff --git a/avm/res/insights/component/linked-storage-account/main.bicep b/avm/res/insights/component/linked-storage-account/main.bicep index 0c14146ca51..8d33148670e 100644 --- a/avm/res/insights/component/linked-storage-account/main.bicep +++ b/avm/res/insights/component/linked-storage-account/main.bicep @@ -47,5 +47,5 @@ output name string = linkedStorageAccount.name @description('The resource ID of the Linked Storage Account.') output resourceId string = linkedStorageAccount.id -@description('The resource group the agent pool was deployed into.') +@description('The resource group the Linked Storage Account was deployed into.') output resourceGroupName string = resourceGroup().name diff --git a/avm/res/insights/component/linked-storage-account/main.json b/avm/res/insights/component/linked-storage-account/main.json index cac7e8000ef..39a52f14b46 100644 --- a/avm/res/insights/component/linked-storage-account/main.json +++ b/avm/res/insights/component/linked-storage-account/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.42.1.51946", - "templateHash": "12204106674143308958" + "version": "0.43.8.12551", + "templateHash": "2192417628097472493" }, "name": "Application Insights Linked Storage Account", "description": "This component deploys an Application Insights Linked Storage Account." @@ -79,7 +79,7 @@ "resourceGroupName": { "type": "string", "metadata": { - "description": "The resource group the agent pool was deployed into." + "description": "The resource group the Linked Storage Account was deployed into." }, "value": "[resourceGroup().name]" } diff --git a/avm/res/insights/component/main.json b/avm/res/insights/component/main.json index e79ec9918a7..83267abb5ff 100644 --- a/avm/res/insights/component/main.json +++ b/avm/res/insights/component/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.42.1.51946", - "templateHash": "6182125553791029195" + "version": "0.43.8.12551", + "templateHash": "11610712855259870996" }, "name": "Application Insights", "description": "This component deploys an Application Insights instance." @@ -609,8 +609,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.42.1.51946", - "templateHash": "12204106674143308958" + "version": "0.43.8.12551", + "templateHash": "2192417628097472493" }, "name": "Application Insights Linked Storage Account", "description": "This component deploys an Application Insights Linked Storage Account." @@ -684,7 +684,7 @@ "resourceGroupName": { "type": "string", "metadata": { - "description": "The resource group the agent pool was deployed into." + "description": "The resource group the Linked Storage Account was deployed into." }, "value": "[resourceGroup().name]" } From 9966259aca6eb558180b3a5d7bee099ecf5fb778 Mon Sep 17 00:00:00 2001 From: Kris Baranek <20225789+krbar@users.noreply.github.com> Date: Tue, 19 May 2026 10:38:57 +0200 Subject: [PATCH 3/3] Update README --- avm/res/insights/component/linked-storage-account/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avm/res/insights/component/linked-storage-account/README.md b/avm/res/insights/component/linked-storage-account/README.md index e7d9976b4db..b5a2062fd68 100644 --- a/avm/res/insights/component/linked-storage-account/README.md +++ b/avm/res/insights/component/linked-storage-account/README.md @@ -21,7 +21,7 @@ For examples, please refer to the [Usage Examples](#usage-examples) section. | Resource Type | API Version | References | | :-- | :-- | :-- | -| `microsoft.insights/components/linkedStorageAccounts` | 2020-03-01-preview | | +| `microsoft.insights/components/linkedStorageAccounts` | 2020-03-01-preview | | ## Parameters