Skip to content

Commit

Permalink
test: showing how to export functions into wara.psm1
Browse files Browse the repository at this point in the history
  • Loading branch information
kpoineal committed Sep 27, 2024
1 parent 044fb42 commit 409e346
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/WARA/wara.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ NestedModules = @("advisor/advisor.psm1",
)

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @()
FunctionsToExport = @("Test-Export")

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()
Expand Down
9 changes: 9 additions & 0 deletions src/modules/WARA/wara.psm1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Function Test-Export{
$SubscriptionFilterList = @('/subscriptions/11111111-1111-1111-1111-111111111111', '/subscriptions/33333333-3333-3333-3333-333333333333')
$ResourceGroupFilterList = @('/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/test2', '/subscriptions/44444444-4444-4444-4444-444444444444/resourceGroups/test4')
$ResourceFilterList = @('/subscriptions/77777777-7777-7777-7777-777777777777/resourceGroups/test7/providers/Microsoft.Compute/virtualMachines/TestVM7', '/subscriptions/66666666-6666-6666-6666-666666666666/resourceGroups/test6/providers/Microsoft.Compute/virtualMachines/TestVM6')
$KeyColumn = 'id'

$result = Get-WAFImplicitSubscriptionId -SubscriptionFilters $SubscriptionFilterList -ResourceGroupFilters $ResourceGroupFilterList -ResourceFilters $ResourceFilterList
return $result
}

0 comments on commit 409e346

Please sign in to comment.