Skip to content

Commit

Permalink
Uses unique Resource Group ID to generate unique workspace id, to avo…
Browse files Browse the repository at this point in the history
…id multiple workspace gets created when deploy template multiple times
  • Loading branch information
junyemagna committed Dec 4, 2020
1 parent 750b88a commit aa4c0de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
"PlaybookName": {
"defaultValue": "Get-SecureScoreData",
"type": "String"
},
"GUID": {
"type": "string",
"defaultValue": "[newGuid()]"
},
},
"workspaceName": {
"type": "string",
"defaultValue": "Enter the workspace name"
Expand All @@ -26,7 +22,7 @@
"variables": {
"AzureLogAnalyticsDataCollectorConnectionName": "[concat('azureloganalyticsdatacollector-', parameters('PlaybookName'))]",
"WorkbookName": "SecureScoreWorkbook",
"WorkbookId": "[guid('SecureScoreData', subscription().subscriptionId)]"
"WorkbookId": "[guid('SecureScoreData', resourceGroup().id)]"
},
"resources": [
{
Expand Down
8 changes: 2 additions & 6 deletions Secure Score/Get-SecureScoreData/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
"PlaybookName": {
"defaultValue": "Get-SecureScoreData",
"type": "String"
},
"GUID": {
"type": "string",
"defaultValue": "[newGuid()]"
}
},
"variables": {
"AzureLogAnalyticsDataCollectorConnectionName": "[concat('azureloganalyticsdatacollector-', parameters('PlaybookName'))]",
"AzureLogAnalyticsWorkspaceName": "[concat('SecureScoreData-', uniqueString(parameters('GUID')))]",
"AzureLogAnalyticsWorkspaceName": "[concat('SecureScoreData-', uniqueString(resourceGroup().id))]",
"WorkbookName": "SecureScoreWorkbook",
"WorkbookId": "[guid('SecureScoreData', subscription().subscriptionId)]"
"WorkbookId": "[guid('SecureScoreData', resourceGroup().id)]"
},
"resources": [
{
Expand Down

0 comments on commit aa4c0de

Please sign in to comment.