forked from Azure/PSRule.Rules.Azure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BaselineIndex.Doc.ps1
64 lines (53 loc) · 2.13 KB
/
BaselineIndex.Doc.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
Document 'index' {
Title 'Baselines'
Metadata @{
generated = $True
title = 'Baselines'
}
Import-Module ./out/modules/PSRule.Rules.Azure
$baselines = Get-PSRuleBaseline -Module PSRule.Rules.Azure -WarningAction SilentlyContinue;
Section 'Quarterly baselines' {
'Quarterly baselines provide a quarterly checkpoint of rules.'
Section 'GA' {
'The following baselines relate to generally available Azure features.'
$baselines | Where-Object { $_.Name -like 'Azure.GA_*' } | Sort-Object -Property Name -Descending | Table -Property @{ Name = 'Name'; Expression = {
"[$($_.Name)]($($_.Name).md)"
}}, Synopsis, @{ Name = 'Status'; Expression = {
if ($_.Flags -eq 'None') {
'Latest'
}
else {
$_.Flags.ToString()
}
}}
}
Section 'Preview' {
'The following baselines relate to preview Azure features.'
$baselines | Where-Object { $_.Name -like 'Azure.Preview_*' } | Sort-Object -Property Name -Descending | Table -Property @{ Name = 'Name'; Expression = {
"[$($_.Name)]($($_.Name).md)"
}}, Synopsis, @{ Name = 'Status'; Expression = {
if ($_.Flags -eq 'None') {
'Latest'
}
else {
$_.Flags.ToString()
}
}}
}
}
Section 'Pillar specific baselines' {
'Pillar specific baselines provide a focused set of rules for a specific Azure Well-Architected Pillar.'
$baselines | Where-Object { $_.Name -like 'Azure.Pillar.*' } | Sort-Object -Property Name -Descending | Table -Property @{ Name = 'Name'; Expression = {
"[$($_.Name)]($($_.Name).md)"
}}, Synopsis, @{ Name = 'Status'; Expression = {
if ($_.Flags -eq 'None') {
'Latest'
}
else {
$_.Flags.ToString()
}
}}
}
}