From 781228e1b85fd5b3def4601903755faa3e718056 Mon Sep 17 00:00:00 2001 From: Matt Hoffmeister Date: Fri, 9 Aug 2024 08:20:10 -0500 Subject: [PATCH 1/2] feat: add system-assigned managed identity option --- avm/res/kusto/cluster/main.bicep | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/avm/res/kusto/cluster/main.bicep b/avm/res/kusto/cluster/main.bicep index 345e2b7317..367b3980d0 100644 --- a/avm/res/kusto/cluster/main.bicep +++ b/avm/res/kusto/cluster/main.bicep @@ -129,7 +129,9 @@ var formattedUserAssignedIdentities = reduce( var identity = !empty(managedIdentities) ? { - type: !empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : 'None' + type: (managedIdentities.?systemAssigned ?? false) + ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') + : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : 'None') userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null } : null @@ -296,7 +298,7 @@ module kustoCluster_principalAssignments 'principal-assignment/main.bicep' = [ principalId: principalAssignment.principalId principalType: principalAssignment.principalType role: principalAssignment.role - tenantId: contains(principalAssignment, 'tenantId') ? principalAssignment.tenantId : tenant().tenantId + tenantId: principalAssignment.?tenantId ?? tenant().tenantId } } ] @@ -467,6 +469,9 @@ type lockType = { }? type managedIdentitiesType = { + @description('Optional. Enables system assigned managed identity on the resource.') + systemAssigned: bool? + @description('Optional. The resource id(s) to assign to the resource.') userAssignedResourceIds: string[] }? From e7835db0ca13eda3eca25485e908682f7f2d6fa8 Mon Sep 17 00:00:00 2001 From: Matt Hoffmeister Date: Fri, 9 Aug 2024 08:40:13 -0500 Subject: [PATCH 2/2] Update version --- avm/res/kusto/cluster/version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avm/res/kusto/cluster/version.json b/avm/res/kusto/cluster/version.json index 729ac87673..76049e1c4a 100644 --- a/avm/res/kusto/cluster/version.json +++ b/avm/res/kusto/cluster/version.json @@ -1,6 +1,6 @@ { "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.2", + "version": "0.3", "pathFilters": [ "./main.json" ]