From b6d579be95a0d4970491c935a5b402a119914cc5 Mon Sep 17 00:00:00 2001 From: Frode Hus Date: Mon, 16 Dec 2024 08:13:41 +0100 Subject: [PATCH] Update Bicep modules and main.bicep parameters Updated BeyondTrustConnector.sln to include new Bicep module files: - Added modules/datacollection.bicep - Added modules/functionapp.bicep - Added modules/vault-role-assignment.bicep - Added modules/workspace-role-assignment.bicep Modified functionappModule in main.bicep: - Updated appName parameter for uniqueness - Changed workspaceName parameter in dataCollection object Updated workspaceMetricPublisherRoleAssignment module: - Removed comment from roleDefinitionId parameter --- BeyondTrustConnector.sln | 4 ++++ main.bicep | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/BeyondTrustConnector.sln b/BeyondTrustConnector.sln index e2e406e..e7d8301 100644 --- a/BeyondTrustConnector.sln +++ b/BeyondTrustConnector.sln @@ -9,7 +9,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeyondTrustConnector.Tests" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "deploy", "deploy", "{F48F5888-80FE-41FD-B8EE-965E758D2DB3}" ProjectSection(SolutionItems) = preProject + modules\datacollection.bicep = modules\datacollection.bicep + modules\functionapp.bicep = modules\functionapp.bicep main.bicep = main.bicep + modules\vault-role-assignment.bicep = modules\vault-role-assignment.bicep + modules\workspace-role-assignment.bicep = modules\workspace-role-assignment.bicep EndProjectSection EndProject Global diff --git a/main.bicep b/main.bicep index 6410a68..1cf68f2 100644 --- a/main.bicep +++ b/main.bicep @@ -25,10 +25,10 @@ module datacollectionModule './modules/datacollection.bicep' = { module functionappModule './modules/functionapp.bicep' = { name: 'functionapp' params: { - appName: functionConfig.name + appName: '${functionConfig.name}-${uniqueString(resourceGroup().name)}' location: resourceGroup().location dataCollection: { - workspaceName: datacollectionModule.outputs.workspaceResourceId + workspaceName: datacollectionModule.outputs.workspaceId endpointImmutableId: datacollectionModule.outputs.dcrImmutableId endpointUri: datacollectionModule.outputs.logsIngestionEndpoint beyondTrustTenant: beyondTrustTenant @@ -62,7 +62,7 @@ module workspaceMetricPublisherRoleAssignment './modules/workspace-role-assignme name: 'workspaceMetricPublisherRoleAssignment' params: { roleAssignmentName: '${uniqueString(functionConfig.name)}-workspace-metric-publisher-role-assignment' - roleDefinitionId: '3913510d-42f4-4e42-8a64-420c390055eb' // Log Analytics Reader + roleDefinitionId: '3913510d-42f4-4e42-8a64-420c390055eb' principalId: principalId workspaceName: datacollection.workspaceName }