Skip to content

Commit

Permalink
Update: only one type of identity is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
krbar committed Sep 8, 2024
1 parent 50f0dbc commit da394d4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 37 deletions.
20 changes: 4 additions & 16 deletions avm/res/insights/data-collection-rule/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,6 @@ module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:<vers
name: 'idcrcusbas001'
// Non-required parameters
location: '<location>'
managedIdentities: {
userAssignedResourceIds: [
'<managedIdentityResourceId>'
]
}
tags: {
'hidden-title': 'This is visible in the resource name'
kind: 'Windows'
Expand Down Expand Up @@ -501,13 +496,6 @@ module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:<vers
"location": {
"value": "<location>"
},
"managedIdentities": {
"value": {
"userAssignedResourceIds": [
"<managedIdentityResourceId>"
]
}
},
"tags": {
"value": {
"hidden-title": "This is visible in the resource name",
Expand Down Expand Up @@ -1237,7 +1225,7 @@ module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:<vers
name: 'myCustomLockName'
}
managedIdentities: {
systemAssigned: true
systemAssigned: false
userAssignedResourceIds: [
'<managedIdentityResourceId>'
]
Expand Down Expand Up @@ -1359,7 +1347,7 @@ module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:<vers
},
"managedIdentities": {
"value": {
"systemAssigned": true,
"systemAssigned": false,
"userAssignedResourceIds": [
"<managedIdentityResourceId>"
]
Expand Down Expand Up @@ -1960,7 +1948,7 @@ module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:<vers
| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable/Disable usage telemetry for module. |
| [`location`](#parameter-location) | string | Location for all Resources. |
| [`lock`](#parameter-lock) | object | The lock settings of the service. |
| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. Only one type of, and up to one managed identity is supported. |
| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
| [`tags`](#parameter-tags) | object | Resource tags. |

Expand Down Expand Up @@ -2032,7 +2020,7 @@ Specify the name of lock.

### Parameter: `managedIdentities`

The managed identity definition for this resource.
The managed identity definition for this resource. Only one type of, and up to one managed identity is supported.

- Required: No
- Type: object
Expand Down
2 changes: 1 addition & 1 deletion avm/res/insights/data-collection-rule/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ param location string = resourceGroup().location
@description('Optional. The lock settings of the service.')
param lock lockType

@description('Optional. The managed identity definition for this resource.')
@description('Optional. The managed identity definition for this resource. Only one type of, and up to one managed identity is supported.')
param managedIdentities managedIdentitiesType

@description('Optional. Array of role assignments to create.')
Expand Down
4 changes: 2 additions & 2 deletions avm/res/insights/data-collection-rule/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "3740033198213213168"
"templateHash": "6159067500010827927"
},
"name": "Data Collection Rules",
"description": "This module deploys a Data Collection Rule.",
Expand Down Expand Up @@ -422,7 +422,7 @@
"managedIdentities": {
"$ref": "#/definitions/managedIdentitiesType",
"metadata": {
"description": "Optional. The managed identity definition for this resource."
"description": "Optional. The managed identity definition for this resource. Only one type of, and up to one managed identity is supported."
}
},
"roleAssignments": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ param dataCollectionEndpointName string
@description('Required. The name of the log analytics workspace to create.')
param logAnalyticsWorkspaceName string

@description('Required. The name of the managed identity to create.')
param managedIdentityName string

resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
name: logAnalyticsWorkspaceName
location: location
Expand Down Expand Up @@ -45,11 +42,6 @@ resource dataCollectionEndpoint 'Microsoft.Insights/dataCollectionEndpoints@2023
}
}

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
name: managedIdentityName
location: location
}

@description('The resource ID of the created Log Analytics Workspace.')
output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.id

Expand All @@ -58,6 +50,3 @@ output logAnalyticsWorkspaceName string = logAnalyticsWorkspace.name

@description('The resource ID of the created Data Collection Endpoint.')
output dataCollectionEndpointResourceId string = dataCollectionEndpoint.id

@description('The resource ID of the created Managed Identity.')
output managedIdentityResourceId string = managedIdentity.id
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ module nestedDependencies 'dependencies.bicep' = {
params: {
dataCollectionEndpointName: 'dep-${namePrefix}-dce-${serviceShort}'
logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
location: resourceLocation
}
}
Expand Down Expand Up @@ -112,11 +111,6 @@ module testDeployment '../../../main.bicep' = [
}
}
}
managedIdentities: {
userAssignedResourceIds: [
nestedDependencies.outputs.managedIdentityResourceId
]
}
tags: {
'hidden-title': 'This is visible in the resource name'
resourceType: 'Data Collection Rules'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ module testDeployment '../../../main.bicep' = [
name: 'myCustomLockName'
}
managedIdentities: {
systemAssigned: true
systemAssigned: false
userAssignedResourceIds: [
nestedDependencies.outputs.managedIdentityResourceId
]
Expand Down

0 comments on commit da394d4

Please sign in to comment.