forked from Azure/bicep-registry-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add additional input parameters and child module for App Insigh…
…ts AVM module (Azure#896) ## Description closes Azure#895 ## Pipeline [![avm.res.insights.component](https://github.com/tyconsulting/bicep-registry-modules/actions/workflows/avm.res.insights.component.yml/badge.svg?branch=users%2Ftao%2F895_appInsights)](https://github.com/tyconsulting/bicep-registry-modules/actions/workflows/avm.res.insights.component.yml) ## Adding a new module <!--Run through the checklist if your PR adds a new module.--> - [ ] A proposal has been submitted and approved. - [ ] I have included "Closes #{module_proposal_issue_number}" in the PR description. - [ ] I have run `brm validate` locally to verify the module files. - [ ] I have run deployment tests locally to ensure the module is deployable. ## Updating an existing module <!--Run through the checklist if your PR updates an existing module.--> - [ ] This is a bug fix: - [ ] Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description. - [ ] The bug was found by the module author, and no one has opened an issue to report it yet. - [ ] I have run `brm validate` locally to verify the module files. - [x] I have run deployment tests locally to ensure the module is deployable. - [x] I have read the [Updating an existing module](https://github.com/Azure/bicep-registry-modules/blob/main/CONTRIBUTING.md#updating-an-existing-module) section in the contributing guide and updated the `version.json` file properly: - [ ] The PR contains backwards compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`. - [x] The PR contains backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [ ] The PR contains breaking changes, and I have bumped the MAJOR version in `version.json`. - [x] I have updated the examples in README with the latest module version number. --------- Co-authored-by: Kris Baranek <[email protected]>
- Loading branch information
1 parent
33eddb5
commit 2194eb1
Showing
10 changed files
with
386 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
avm/res/insights/component/linkedStorageAccounts/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Application Insights Linked Storage Account `[microsoft.insights/components/linkedStorageAccounts]` | ||
|
||
This component deploys an Application Insights Linked Storage Account. | ||
|
||
## Navigation | ||
|
||
- [Resource Types](#Resource-Types) | ||
- [Parameters](#Parameters) | ||
- [Outputs](#Outputs) | ||
- [Cross-referenced modules](#Cross-referenced-modules) | ||
- [Data Collection](#Data-Collection) | ||
|
||
## Resource Types | ||
|
||
| Resource Type | API Version | | ||
| :-- | :-- | | ||
| `microsoft.insights/components/linkedStorageAccounts` | [2020-03-01-preview](https://learn.microsoft.com/en-us/azure/templates/microsoft.insights/2020-03-01-preview/components/linkedStorageAccounts) | | ||
|
||
## Parameters | ||
|
||
**Required parameters** | ||
|
||
| Parameter | Type | Description | | ||
| :-- | :-- | :-- | | ||
| [`storageAccountResourceId`](#parameter-storageaccountresourceid) | string | Linked storage account resource ID. | | ||
|
||
**Conditional parameters** | ||
|
||
| Parameter | Type | Description | | ||
| :-- | :-- | :-- | | ||
| [`appInsightsName`](#parameter-appinsightsname) | string | The name of the parent Application Insights instance. Required if the template is used in a standalone deployment. | | ||
|
||
### Parameter: `storageAccountResourceId` | ||
|
||
Linked storage account resource ID. | ||
|
||
- Required: Yes | ||
- Type: string | ||
|
||
### Parameter: `appInsightsName` | ||
|
||
The name of the parent Application Insights instance. Required if the template is used in a standalone deployment. | ||
|
||
- Required: Yes | ||
- Type: string | ||
|
||
|
||
## Outputs | ||
|
||
| Output | Type | Description | | ||
| :-- | :-- | :-- | | ||
| `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. | | ||
|
||
## Cross-referenced modules | ||
|
||
_None_ | ||
|
||
## 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. |
30 changes: 30 additions & 0 deletions
30
avm/res/insights/component/linkedStorageAccounts/main.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
metadata name = 'Application Insights Linked Storage Account' | ||
metadata description = 'This component deploys an Application Insights Linked Storage Account.' | ||
metadata owner = 'Azure/module-maintainers' | ||
|
||
@description('Conditional. The name of the parent Application Insights instance. Required if the template is used in a standalone deployment.') | ||
param appInsightsName string | ||
|
||
@description('Required. Linked storage account resource ID.') | ||
param storageAccountResourceId string | ||
|
||
resource appInsights 'Microsoft.Insights/components@2020-02-02' existing = { | ||
name: appInsightsName | ||
} | ||
|
||
resource linkedStorageAccount 'Microsoft.Insights/components/linkedStorageAccounts@2020-03-01-preview' = { | ||
name: 'ServiceProfiler' | ||
parent: appInsights | ||
properties: { | ||
linkedStorageAccount: storageAccountResourceId | ||
} | ||
} | ||
|
||
@description('The name of the Linked Storage Account.') | ||
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.') | ||
output resourceGroupName string = resourceGroup().name |
61 changes: 61 additions & 0 deletions
61
avm/res/insights/component/linkedStorageAccounts/main.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"metadata": { | ||
"_generator": { | ||
"name": "bicep", | ||
"version": "0.24.24.22086", | ||
"templateHash": "15481388144279509267" | ||
}, | ||
"name": "Application Insights Linked Storage Account", | ||
"description": "This component deploys an Application Insights Linked Storage Account.", | ||
"owner": "Azure/module-maintainers" | ||
}, | ||
"parameters": { | ||
"appInsightsName": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Conditional. The name of the parent Application Insights instance. Required if the template is used in a standalone deployment." | ||
} | ||
}, | ||
"storageAccountResourceId": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Required. Linked storage account resource ID." | ||
} | ||
} | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "microsoft.insights/components/linkedStorageAccounts", | ||
"apiVersion": "2020-03-01-preview", | ||
"name": "[format('{0}/{1}', parameters('appInsightsName'), 'ServiceProfiler')]", | ||
"properties": { | ||
"linkedStorageAccount": "[parameters('storageAccountResourceId')]" | ||
} | ||
} | ||
], | ||
"outputs": { | ||
"name": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The name of the Linked Storage Account." | ||
}, | ||
"value": "ServiceProfiler" | ||
}, | ||
"resourceId": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The resource ID of the Linked Storage Account." | ||
}, | ||
"value": "[resourceId('microsoft.insights/components/linkedStorageAccounts', parameters('appInsightsName'), 'ServiceProfiler')]" | ||
}, | ||
"resourceGroupName": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The resource group the agent pool was deployed into." | ||
}, | ||
"value": "[resourceGroup().name]" | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
avm/res/insights/component/linkedStorageAccounts/version.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", | ||
"version": "0.2", | ||
"pathFilters": [ | ||
"./main.json" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.