-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.ps1
40 lines (31 loc) · 916 Bytes
/
action.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<#
Title: Asim-ToArm Converter
Language: PowerShell
Version: 1.0
Author: Rogier Dijkman
Last Modified: 24/08/2023
DESCRIPTION
This GitHub action is used to convert Yaml Sentinel Detections to deployable ARM templates.
#>
param (
[Parameter(Mandatory = $true)]
[string]$FilesPath = '.',
[Parameter(Mandatory = $true)]
[string]$OutputPath = '.',
[Parameter(Mandatory = $false)]
[string]$returnObject = 'false'
)
try {
Write-Verbose "Importing Helper Module"
Import-Module "$($PSScriptRoot)/modules/HelperFunctions.psm1"
} catch {
Write-Error $_.Exception.Message
break
}
# Starting Conversion of files
$hashTable = @{
FilesPath = $FilesPath
OutputPath = $OutputPath
ReturnObject = [System.Convert]::ToBoolean($ReturnObject)
}
Convert-AsimToArm @hashTable