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..b5a2062fd68 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,10 +57,22 @@ 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 | | :-- | :-- | :-- | | `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 + +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..8d33148670e 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 } @@ -25,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 6fa07c11dbb..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.41.2.15936", - "templateHash": "18407373523862927704" + "version": "0.43.8.12551", + "templateHash": "2192417628097472493" }, "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", @@ -52,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/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..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.41.2.15936", - "templateHash": "5312459819645101981" + "version": "0.43.8.12551", + "templateHash": "11610712855259870996" }, "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.43.8.12551", + "templateHash": "2192417628097472493" }, "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", @@ -653,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]" }