diff --git a/Tools/Sentinel-All-In-One/v2/LinkedTemplates/solutionsAndAlerts.json b/Tools/Sentinel-All-In-One/v2/LinkedTemplates/solutionsAndAlerts.json index f0a8bee18eb..005bcf1aff9 100644 --- a/Tools/Sentinel-All-In-One/v2/LinkedTemplates/solutionsAndAlerts.json +++ b/Tools/Sentinel-All-In-One/v2/LinkedTemplates/solutionsAndAlerts.json @@ -44,12 +44,13 @@ }, "roleGuid": { "type": "string", - "defaultValue": "[newGuid()]" + "defaultValue": "[guid(resourceGroup().id, 'b24988ac-6180-42a0-ab88-20f7382dd24c')]" } }, "functions": [], "variables": { "identityName": "[concat('userIdentity',uniqueString(resourceGroup().id))]", + "roleGuidId": "[if(empty(parameters('roleGuid')), guid(resourceGroup().id, 'userIdentity', 'b24988ac-6180-42a0-ab88-20f7382dd24c'), parameters('roleGuid'))]", "solutions": "[replace(concat(parameters('enableSolutions1P'),if(and(not(empty(parameters('enableSolutions1P'))),not(empty(parameters('enableSolutionsEssentials')))),concat(',',parameters('enableSolutionsEssentials')),parameters('enableSolutionsEssentials')),if(or(not(empty(parameters('enableSolutionsEssentials'))),not(empty(parameters('enableSolutions1P')))),concat(',',parameters('enableSolutionsTraining')),parameters('enableSolutionsTraining'))),'\"','\\\"')]", "severities": "[if(empty(parameters('severityLevels')),'None',parameters('severityLevels'))]" }, @@ -61,7 +62,9 @@ "location": "[resourceGroup().location]" }, { - "dependsOn": ["[concat('Microsoft.ManagedIdentity/userAssignedIdentities/', variables('identityName'))]"], + "dependsOn": [ + "[concat('Microsoft.ManagedIdentity/userAssignedIdentities/', variables('identityName'))]" + ], "type": "Microsoft.Resources/deploymentScripts", "apiVersion": "2020-10-01", "name": "sleep", @@ -81,7 +84,7 @@ { "apiVersion": "2017-09-01", "type": "Microsoft.Authorization/roleAssignments", - "name": "[parameters('roleGuid')]", + "name": "[variables('roleGuidId')]", "properties": { "roleDefinitionId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", "principalId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('identityName')), '2018-11-30', 'Full').properties.principalId]", @@ -92,7 +95,9 @@ ] }, { - "dependsOn": ["[concat('Microsoft.Authorization/roleAssignments/', parameters('roleGuid'))]"], + "dependsOn": [ + "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('identityName'))]" + ], "type": "Microsoft.Resources/deploymentScripts", "apiVersion": "2020-10-01", "name": "deployRules", @@ -107,8 +112,8 @@ "properties": { "forceUpdateTag": "1", "azPowerShellVersion": "3.0", - "arguments": "[concat('-Workspace ', parameters('workspaceName'), ' -ResourceGroup ', resourceGroup().name, ' -Solutions ', variables('solutions'), ' -SeveritiesToInclude ', string(variables('severities')), ' -Region ', parameters('location'), ' -IsGov $false')]", - "primaryScriptUri": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main/Scripts/Create-NewSolutionAndRulesFromList.ps1", + "arguments": "[concat('-Workspace ', parameters('workspaceName'), ' -ResourceGroup ', resourceGroup().name, ' -Solutions ', variables('solutions'), ' -SeveritiesToInclude ', string(variables('severities')), ' -Region ', parameters('location'), ' -IsGov $false')]", + "primaryScriptUri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Tools/Sentinel-All-In-One/v2/Scripts/Create-NewSolutionAndRulesFromList.ps1", "supportingScriptUris": [], "timeout": "PT30M", "cleanupPreference": "OnExpiration", @@ -117,4 +122,4 @@ } ], "outputs": {} -} +} \ No newline at end of file diff --git a/Tools/Sentinel-All-In-One/v2/LinkedTemplates/solutionsAndAlertsGov.json b/Tools/Sentinel-All-In-One/v2/LinkedTemplates/solutionsAndAlertsGov.json index f86a1b5766a..457d9bb12b8 100644 --- a/Tools/Sentinel-All-In-One/v2/LinkedTemplates/solutionsAndAlertsGov.json +++ b/Tools/Sentinel-All-In-One/v2/LinkedTemplates/solutionsAndAlertsGov.json @@ -44,12 +44,13 @@ }, "roleGuid": { "type": "string", - "defaultValue": "[newGuid()]" + "defaultValue": "[guid(resourceGroup().id, 'b24988ac-6180-42a0-ab88-20f7382dd24c')]" } }, "functions": [], "variables": { "identityName": "[concat('userIdentity',uniqueString(resourceGroup().id))]", + "roleGuidId": "[if(empty(parameters('roleGuid')), guid(resourceGroup().id, 'userIdentity', 'b24988ac-6180-42a0-ab88-20f7382dd24c'), parameters('roleGuid'))]", "solutions": "[replace(concat(parameters('enableSolutions1P'),if(and(not(empty(parameters('enableSolutions1P'))),not(empty(parameters('enableSolutionsEssentials')))),concat(',',parameters('enableSolutionsEssentials')),parameters('enableSolutionsEssentials')),if(or(not(empty(parameters('enableSolutionsEssentials'))),not(empty(parameters('enableSolutions1P')))),concat(',',parameters('enableSolutionsTraining')),parameters('enableSolutionsTraining'))),'\"','\\\"')]", "severities": "[if(empty(parameters('severityLevels')),'None',parameters('severityLevels'))]" }, @@ -61,7 +62,9 @@ "location": "[resourceGroup().location]" }, { - "dependsOn": [ "[concat('Microsoft.ManagedIdentity/userAssignedIdentities/', variables('identityName'))]" ], + "dependsOn": [ + "[concat('Microsoft.ManagedIdentity/userAssignedIdentities/', variables('identityName'))]" + ], "type": "Microsoft.Resources/deploymentScripts", "apiVersion": "2020-10-01", "name": "sleep", @@ -81,7 +84,7 @@ { "apiVersion": "2017-09-01", "type": "Microsoft.Authorization/roleAssignments", - "name": "[parameters('roleGuid')]", + "name": "[variables('roleGuidId')]", "properties": { "roleDefinitionId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", "principalId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('identityName')), '2018-11-30', 'Full').properties.principalId]", @@ -92,7 +95,9 @@ ] }, { - "dependsOn": [ "[concat('Microsoft.Authorization/roleAssignments/', parameters('roleGuid'))]" ], + "dependsOn": [ + "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('identityName'))]" + ], "type": "Microsoft.Resources/deploymentScripts", "apiVersion": "2020-10-01", "name": "deployRules", @@ -108,7 +113,7 @@ "forceUpdateTag": "1", "azPowerShellVersion": "3.0", "arguments": "[concat('-Workspace ', parameters('workspaceName'), ' -ResourceGroup ', resourceGroup().name, ' -Solutions ', variables('solutions'), ' -SeveritiesToInclude ', string(variables('severities')), ' -Region ', parameters('location'), ' -IsGov $true')]", - "primaryScriptUri": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main/Scripts/Create-NewSolutionAndRulesFromList.ps1", + "primaryScriptUri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Tools/Sentinel-All-In-One/v2/Scripts/Create-NewSolutionAndRulesFromList.ps1", "supportingScriptUris": [], "timeout": "PT30M", "cleanupPreference": "OnExpiration", @@ -117,4 +122,4 @@ } ], "outputs": {} -} +} \ No newline at end of file diff --git a/Tools/Sentinel-All-In-One/v2/azuredeploy.json b/Tools/Sentinel-All-In-One/v2/azuredeploy.json index 884f9fb46dc..2899b0e74d0 100644 --- a/Tools/Sentinel-All-In-One/v2/azuredeploy.json +++ b/Tools/Sentinel-All-In-One/v2/azuredeploy.json @@ -151,8 +151,7 @@ "defaultValue": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main" } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Resources/resourceGroups", @@ -172,7 +171,7 @@ "properties": { "mode": "Incremental", "templateLink": { - "uri": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main/LinkedTemplates/workspace.json", + "uri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Tools/Sentinel-All-In-One/v2/LinkedTemplates/workspace.json", "contentVersion": "1.0.0.0" }, "parameters": { @@ -211,7 +210,7 @@ "properties": { "mode": "Incremental", "templateLink": { - "uri": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main/LinkedTemplates/settings.json", + "uri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Tools/Sentinel-All-In-One/v2/LinkedTemplates/settings.json", "contentVersion": "1.0.0.0" }, "parameters": { @@ -243,7 +242,7 @@ "properties": { "mode": "Incremental", "templateLink": { - "uri": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main/LinkedTemplates/dataConnectors.json", + "uri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Tools/Sentinel-All-In-One/v2/LinkedTemplates/dataConnectors.json", "contentVersion": "1.0.0.0" }, "parameters": { @@ -281,7 +280,7 @@ "properties": { "mode": "Incremental", "templateLink": { - "uri": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main/LinkedTemplates/solutionsAndAlerts.json", + "uri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Tools/Sentinel-All-In-One/v2/LinkedTemplates/solutionsAndAlerts.json", "contentVersion": "1.0.0.0" }, "parameters": { diff --git a/Tools/Sentinel-All-In-One/v2/azuredeployGov.json b/Tools/Sentinel-All-In-One/v2/azuredeployGov.json index e4e52684da3..265810792ef 100644 --- a/Tools/Sentinel-All-In-One/v2/azuredeployGov.json +++ b/Tools/Sentinel-All-In-One/v2/azuredeployGov.json @@ -148,7 +148,7 @@ "metadata": { "description": "The location of resources" }, - "defaultValue": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main" + "defaultValue": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Tools/Sentinel-All-In-One/v2" } }, "variables": { @@ -172,7 +172,7 @@ "properties": { "mode": "Incremental", "templateLink": { - "uri": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main/LinkedTemplates/workspace.json", + "uri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Tools/Sentinel-All-In-One/v2/LinkedTemplates/workspace.json", "contentVersion": "1.0.0.0" }, "parameters": { @@ -211,7 +211,7 @@ "properties": { "mode": "Incremental", "templateLink": { - "uri": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main/LinkedTemplates/settings.json", + "uri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Tools/Sentinel-All-In-One/v2/LinkedTemplates/settings.json", "contentVersion": "1.0.0.0" }, "parameters": { @@ -243,7 +243,7 @@ "properties": { "mode": "Incremental", "templateLink": { - "uri": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main/LinkedTemplates/dataConnectorsGov.json", + "uri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Tools/Sentinel-All-In-One/v2/LinkedTemplates/dataConnectorsGov.json", "contentVersion": "1.0.0.0" }, "parameters": { @@ -281,7 +281,7 @@ "properties": { "mode": "Incremental", "templateLink": { - "uri": "https://raw.githubusercontent.com/garybushey/AllInOneGov/main/LinkedTemplates/solutionsAndAlertsGov.json", + "uri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Tools/Sentinel-All-In-One/v2/LinkedTemplates/solutionsAndAlertsGov.json", "contentVersion": "1.0.0.0" }, "parameters": {