Skip to content

Commit

Permalink
feat: Updated avm/res/insights/diagnostic-setting to latest UDT spe…
Browse files Browse the repository at this point in the history
…cs (#4390)

Update to latest UDT specs

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.insights.diagnostic-setting](https://github.com/krbar/bicep-registry-modules/actions/workflows/avm.res.insights.diagnostic-setting.yml/badge.svg?branch=users%2Fkrbar%2FdiagUDT)](https://github.com/krbar/bicep-registry-modules/actions/workflows/avm.res.insights.diagnostic-setting.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [x] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [x] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [x] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
  • Loading branch information
krbar authored Feb 6, 2025
1 parent 3f90989 commit f336c46
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 50 deletions.
8 changes: 4 additions & 4 deletions avm/res/insights/diagnostic-setting/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ param eventHubAuthorizationRuleResourceId string?
param eventHubName string?

@description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to `[]` to disable log collection.')
param logCategoriesAndGroups logCategoriesAndGroupsType
param logCategoriesAndGroups logCategoriesAndGroupsType[]?

@description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to `[]` to disable log collection.')
param metricCategories metricCategoriesType?
param metricCategories metricCategoriesType[]?

@description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
@allowed([
Expand Down Expand Up @@ -112,7 +112,7 @@ type logCategoriesAndGroupsType = {

@description('Optional. Enable or disable the category explicitly. Default is `true`.')
enabled: bool?
}[]?
}

@description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to `[]` to disable log collection.')
type metricCategoriesType = {
Expand All @@ -121,4 +121,4 @@ type metricCategoriesType = {

@description('Optional. Enable or disable the category explicitly. Default is `true`.')
enabled: bool?
}[]?
}
91 changes: 45 additions & 46 deletions avm/res/insights/diagnostic-setting/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,67 +5,59 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "16751842426340241931"
"version": "0.33.93.31351",
"templateHash": "4069661147816092581"
},
"name": "Diagnostic Settings (Activity Logs) for Azure Subscriptions",
"description": "This module deploys a Subscription wide export of the Activity Log."
},
"definitions": {
"logCategoriesAndGroupsType": {
"type": "array",
"items": {
"type": "object",
"properties": {
"category": {
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
}
},
"categoryGroup": {
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to `AllLogs` to collect all logs."
}
},
"enabled": {
"type": "bool",
"nullable": true,
"metadata": {
"description": "Optional. Enable or disable the category explicitly. Default is `true`."
}
"type": "object",
"properties": {
"category": {
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
}
},
"categoryGroup": {
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to `AllLogs` to collect all logs."
}
},
"enabled": {
"type": "bool",
"nullable": true,
"metadata": {
"description": "Optional. Enable or disable the category explicitly. Default is `true`."
}
}
},
"nullable": true,
"metadata": {
"description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to `[]` to disable log collection."
}
},
"metricCategoriesType": {
"type": "array",
"items": {
"type": "object",
"properties": {
"category": {
"type": "string",
"metadata": {
"description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to `AllMetrics` to collect all metrics."
}
},
"enabled": {
"type": "bool",
"nullable": true,
"metadata": {
"description": "Optional. Enable or disable the category explicitly. Default is `true`."
}
"type": "object",
"properties": {
"category": {
"type": "string",
"metadata": {
"description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to `AllMetrics` to collect all metrics."
}
},
"enabled": {
"type": "bool",
"nullable": true,
"metadata": {
"description": "Optional. Enable or disable the category explicitly. Default is `true`."
}
}
},
"nullable": true,
"metadata": {
"description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to `[]` to disable log collection."
}
Expand Down Expand Up @@ -110,13 +102,20 @@
}
},
"logCategoriesAndGroups": {
"$ref": "#/definitions/logCategoriesAndGroupsType",
"type": "array",
"items": {
"$ref": "#/definitions/logCategoriesAndGroupsType"
},
"nullable": true,
"metadata": {
"description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to `[]` to disable log collection."
}
},
"metricCategories": {
"$ref": "#/definitions/metricCategoriesType",
"type": "array",
"items": {
"$ref": "#/definitions/metricCategoriesType"
},
"nullable": true,
"metadata": {
"description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to `[]` to disable log collection."
Expand Down

0 comments on commit f336c46

Please sign in to comment.