Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions avm/res/insights/component/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions avm/res/insights/component/linked-storage-account/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
29 changes: 28 additions & 1 deletion avm/res/insights/component/linked-storage-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<version>' = {
params: { (...) }
}
```
For examples, please refer to the [Usage Examples](#usage-examples) section.

Comment thread
AlexanderSehr marked this conversation as resolved.
## Navigation

- [Resource Types](#Resource-Types)
- [Parameters](#Parameters)
- [Outputs](#Outputs)
- [Data Collection](#Data-Collection)

## Resource Types

Expand All @@ -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.
Expand All @@ -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 <https://go.microsoft.com/fwlink/?LinkID=824704>. 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.
24 changes: 23 additions & 1 deletion avm/res/insights/component/linked-storage-account/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
33 changes: 30 additions & 3 deletions avm/res/insights/component/linked-storage-account/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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",
Expand Down Expand Up @@ -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]"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.1"
}
3 changes: 3 additions & 0 deletions avm/res/insights/component/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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)}'
Expand Down Expand Up @@ -187,6 +189,7 @@ module linkedStorageAccount 'linked-storage-account/main.bicep' = if (!empty(lin
params: {
appInsightsName: appInsights.name
storageAccountResourceId: linkedStorageAccountResourceId ?? ''
enableTelemetry: enableReferencedModulesTelemetry
}
}

Expand Down
43 changes: 37 additions & 6 deletions avm/res/insights/component/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -597,6 +598,9 @@
},
"storageAccountResourceId": {
"value": "[coalesce(parameters('linkedStorageAccountResourceId'), '')]"
},
"enableTelemetry": {
"value": "[variables('enableReferencedModulesTelemetry')]"
}
},
"template": {
Expand All @@ -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."
Expand All @@ -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",
Expand Down Expand Up @@ -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]"
}
Expand Down
Loading