Skip to content

Commit 54911a9

Browse files
committed
Fixing template variables
1 parent a50ea38 commit 54911a9

File tree

1 file changed

+68
-28
lines changed
  • Solutions/Intel471/Playbooks/Intel471-ImportMalwareIntelligenceToSentinel

1 file changed

+68
-28
lines changed

Solutions/Intel471/Playbooks/Intel471-ImportMalwareIntelligenceToSentinel/azuredeploy.json

Lines changed: 68 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,8 @@
8686
"variables": {
8787
"MicrosoftSentinelConnectionName": "[concat('sentinel-', parameters('PlaybookName'))]",
8888
"AzureBlobConnectionName": "[concat('azureblob-', parameters('PlaybookName'))]",
89-
"StorageAccountName": "[parameters('StorageAccountName')]",
90-
"StorageAccountContainerName": "[parameters('StorageAccountContainerName')]",
9189
"AzureKeyVaultName": "[parameters('KeyVaultName')]",
92-
"AzureKeyVaultConnectionName": "[concat('keyvault-', parameters('PlaybookName'))]",
93-
"BlobNameCursor": "[if(equals(parameters('Backend'), 'Titan'), 'cursorSentinel.txt', 'cursorVerity.txt')]",
94-
"BlobNameFromDate": "[if(equals(parameters('Backend'), 'Titan'), 'fromdateSentinel.txt', 'fromdateVerity.txt')]",
95-
"ApiURI": "[if(equals(parameters('Backend'), 'Titan'), 'https://api.intel471.com/v1/indicators/stream', 'https://api.intel471.cloud/integrations/indicators/v1/indicators/stream')]",
96-
"UsernameSecretName": "[if(equals(parameters('Backend'), 'Titan'), 'TitanUserNameSentinel', 'VerityUserNameSentinel')]",
97-
"ApiKeySecretName": "[if(equals(parameters('Backend'), 'Titan'), 'TitanAPIKeySentinel', 'VerityAPIKeySentinel')]",
98-
"RequestParamFrom": "[if(equals(parameters('Backend'), 'Titan'), 'lastUpdatedFrom', 'from')]",
99-
"RequestParamSize": "[if(equals(parameters('Backend'), 'Titan'), 'count', 'size')]",
100-
"RequestThreatType": "[if(equals(parameters('Backend'), 'Titan'), 'threatType', 'threat_type')]",
101-
"ResponseFieldCursor": "[if(equals(parameters('Backend'), 'Titan'), 'cursorNext', 'cursor_next')]"
90+
"AzureKeyVaultConnectionName": "[concat('keyvault-', parameters('PlaybookName'))]"
10291
},
10392
"resources": [
10493
{
@@ -128,8 +117,8 @@
128117
"id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/azureblob')]"
129118
},
130119
"parameterValues": {
131-
"accountName": "[variables('StorageAccountName')]",
132-
"accessKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('StorageAccountName')), '2022-09-01').keys[0].value]"
120+
"accountName": "[parameters('StorageAccountName')]",
121+
"accessKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('StorageAccountName')), '2022-09-01').keys[0].value]"
133122
}
134123
}
135124
},
@@ -186,15 +175,39 @@
186175
"type": "String"
187176
},
188177
"BlobNameCursor": {
189-
"defaultValue": "[variables('BlobNameCursor')]",
178+
"defaultValue": "",
190179
"type": "String"
191180
},
192181
"BlobNameFromDate": {
193-
"defaultValue": "[variables('BlobNameFromDate')]",
182+
"defaultValue": "",
183+
"type": "String"
184+
},
185+
"ApiURI": {
186+
"defaultValue": "",
187+
"type": "String"
188+
},
189+
"UsernameSecretName": {
190+
"defaultValue": "",
191+
"type": "String"
192+
},
193+
"ApiKeySecretName": {
194+
"defaultValue": "",
195+
"type": "String"
196+
},
197+
"RequestParamFrom": {
198+
"defaultValue": "",
199+
"type": "String"
200+
},
201+
"RequestParamSize": {
202+
"defaultValue": "",
203+
"type": "String"
204+
},
205+
"RequestThreatType": {
206+
"defaultValue": "",
194207
"type": "String"
195208
},
196209
"ResponseFieldCursor": {
197-
"defaultValue": "[variables('ResponseFieldCursor')]",
210+
"defaultValue": "",
198211
"type": "String"
199212
},
200213
"LookBackDays": {
@@ -288,7 +301,7 @@
288301
"HTTP": {
289302
"type": "Http",
290303
"inputs": {
291-
"uri": "[variables('ApiURI')]",
304+
"uri": "@parameters('ApiURI')",
292305
"method": "GET",
293306
"headers": {
294307
"User-Agent": "Intel 471 - Malware Intelligence Sentinel - Azure Logic App 4.0.0"
@@ -562,7 +575,7 @@
562575
}
563576
},
564577
"method": "get",
565-
"path": "[concat('/secrets/', variables('ApiKeySecretName'), '/value')]"
578+
"path": "@concat('/secrets/', parameters('ApiKeySecretName'), '/value')"
566579
},
567580
"runAfter": {
568581
"GetUsername": [
@@ -619,7 +632,7 @@
619632
}
620633
},
621634
"method": "get",
622-
"path": "[concat('/secrets/', variables('UsernameSecretName'), '/value')]"
635+
"path": "@concat('/secrets/', parameters('UsernameSecretName'), '/value')"
623636
},
624637
"runAfter": {}
625638
},
@@ -794,9 +807,9 @@
794807
"name": "payload",
795808
"type": "object",
796809
"value": {
797-
"[variables('RequestParamSize')]": 100,
798-
"[variables('RequestThreatType')]": "malware",
799-
"[variables('RequestParamFrom')]": "@{variables('fromDate')}"
810+
"@{parameters('RequestParamSize')}": 100,
811+
"@{parameters('RequestThreatType')}": "malware",
812+
"@{parameters('RequestParamFrom')}": "@{variables('fromDate')}"
800813
}
801814
}
802815
]
@@ -840,18 +853,45 @@
840853
}
841854
}
842855
},
856+
"WorkspaceID": {
857+
"value": "[parameters('WorkspaceID')]"
858+
},
843859
"StorageAccountName": {
844-
"value": "[variables('StorageAccountName')]"
860+
"value": "[parameters('StorageAccountName')]"
845861
},
846862
"StorageAccountContainerName": {
847-
"value": "[variables('StorageAccountContainerName')]"
863+
"value": "[parameters('StorageAccountContainerName')]"
864+
},
865+
"BlobNameCursor": {
866+
"value": "[if(equals(parameters('Backend'), 'Titan'), 'cursorSentinel.txt', 'cursorVerity.txt')]"
867+
},
868+
"BlobNameFromDate": {
869+
"value": "[if(equals(parameters('Backend'), 'Titan'), 'fromdateSentinel.txt', 'fromdateVerity.txt')]"
870+
},
871+
"ApiURI": {
872+
"value": "[if(equals(parameters('Backend'), 'Titan'), 'https://api.intel471.com/v1/indicators/stream', 'https://api.intel471.cloud/integrations/indicators/v1/indicators/stream')]"
873+
},
874+
"UsernameSecretName": {
875+
"value": "[if(equals(parameters('Backend'), 'Titan'), 'TitanUserNameSentinel', 'VerityUserNameSentinel')]"
876+
},
877+
"ApiKeySecretName": {
878+
"value": "[if(equals(parameters('Backend'), 'Titan'), 'TitanAPIKeySentinel', 'VerityAPIKeySentinel')]"
879+
},
880+
"RequestParamFrom": {
881+
"value": "[if(equals(parameters('Backend'), 'Titan'), 'lastUpdatedFrom', 'from')]"
882+
},
883+
"RequestParamSize": {
884+
"value": "[if(equals(parameters('Backend'), 'Titan'), 'count', 'size')]"
885+
},
886+
"RequestThreatType": {
887+
"value": "[if(equals(parameters('Backend'), 'Titan'), 'threatType', 'threat_type')]"
888+
},
889+
"ResponseFieldCursor": {
890+
"value": "[if(equals(parameters('Backend'), 'Titan'), 'cursorNext', 'cursor_next')]"
848891
},
849892
"LookBackDays": {
850893
"value": "[parameters('LookBackDays')]"
851894
},
852-
"WorkspaceID": {
853-
"value": "[parameters('WorkspaceID')]"
854-
},
855895
"Backend": {
856896
"value": "[parameters('Backend')]"
857897
}

0 commit comments

Comments
 (0)