Skip to content

Commit 00b692f

Browse files
authored
Merge pull request #72 from SumoLogic/SUMO-233810-git-action
git-action-workflow
2 parents 13311ae + 2b889b3 commit 00b692f

File tree

2 files changed

+57
-22
lines changed

2 files changed

+57
-22
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "ARM template tests"
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
best-practices-test:
7+
name: "ARM template tests using arm-ttk"
8+
runs-on: "ubuntu-latest"
9+
steps:
10+
- name: Checkout repo
11+
uses: actions/checkout@v4
12+
13+
- name: Test ARM Templates using arm-ttk
14+
id: filestest
15+
uses: aliencube/arm-ttk-actions@v0.3
16+
with:
17+
path: EventHubs/src/azuredeploy_metrics.json
18+
19+
security-test:
20+
name: "ARM template tests using checkov"
21+
runs-on: "ubuntu-latest"
22+
steps:
23+
- name: Checkout repo
24+
uses: actions/checkout@v4
25+
26+
- name: Test ARM Templates using checkov
27+
id: checkov
28+
uses: bridgecrewio/checkov-action@v12
29+
with:
30+
file: EventHubs/src/azuredeploy_metrics.json
31+
skip_check: CKV_AZURE_16,CKV_AZURE_17,CKV_AZURE_35
32+
quiet: false
33+
framework: arm
34+
output_format: cli
35+
output_bc_ids: true

EventHubs/src/azuredeploy_metrics.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
"type": "String"
5656
},
5757
"logAnalyticsWorkspaceName": {
58-
"defaultValue": "[concat('SMWorkspace', uniqueString(resourceGroup().id))]",
59-
"type": "String"
60-
},
58+
"defaultValue": "[concat('SMWorkspace', uniqueString(resourceGroup().id))]",
59+
"type": "String"
60+
},
6161
"location": {
6262
"type": "string",
6363
"defaultValue": "[resourceGroup().location]",
@@ -281,25 +281,25 @@
281281
]
282282
},
283283
{
284-
"type": "microsoft.operationalinsights/workspaces",
285-
"apiVersion": "2022-10-01",
286-
"name": "[parameters('logAnalyticsWorkspaceName')]",
287-
"location": "[parameters('location')]",
288-
"properties": {
289-
"sku": {
290-
"name": "pergb2018"
291-
},
292-
"retentionInDays": 30,
293-
"features": {
284+
"type": "microsoft.operationalinsights/workspaces",
285+
"apiVersion": "2022-10-01",
286+
"name": "[parameters('logAnalyticsWorkspaceName')]",
287+
"location": "[parameters('location')]",
288+
"properties": {
289+
"sku": {
290+
"name": "pergb2018"
291+
},
292+
"retentionInDays": 30,
293+
"features": {
294294
"enableLogAccessUsingOnlyResourcePermissions": true
295-
},
296-
"workspaceCapping": {
297-
"dailyQuotaGb": -1
298-
},
299-
"publicNetworkAccessForIngestion": "Enabled",
300-
"publicNetworkAccessForQuery": "Enabled"
301-
}
302-
},
295+
},
296+
"workspaceCapping": {
297+
"dailyQuotaGb": -1
298+
},
299+
"publicNetworkAccessForIngestion": "Enabled",
300+
"publicNetworkAccessForQuery": "Enabled"
301+
}
302+
},
303303
{
304304
"name": "[parameters('appInsightsName')]",
305305
"type": "Microsoft.Insights/components",
@@ -313,4 +313,4 @@
313313
}
314314
}
315315
]
316-
}
316+
}

0 commit comments

Comments
 (0)