2020-02-06 14:22:54 +03:00
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# Licensed under the MIT License.
|
2019-05-16 18:07:08 +03:00
|
|
|
|
2022-08-06 10:58:48 +03:00
|
|
|
Document 'index' {
|
|
|
|
Title 'Reference'
|
|
|
|
|
|
|
|
Metadata @{
|
|
|
|
generated = $True
|
2022-08-06 16:58:37 +03:00
|
|
|
title = 'Reference'
|
2022-08-06 10:58:48 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
Import-Module ./out/modules/PSRule.Rules.Azure
|
|
|
|
$rules = Get-PSRule -Module PSRule.Rules.Azure -Baseline Azure.All -WarningAction SilentlyContinue;
|
|
|
|
|
|
|
|
'The following rules and features are included in PSRule for Azure.'
|
|
|
|
|
2022-08-14 11:31:37 +03:00
|
|
|
@"
|
|
|
|
!!! Info
|
|
|
|
The rule _release_ indicates if the Azure feature is _generally available (GA)_ or available under _preview_.
|
2023-09-30 10:35:59 +03:00
|
|
|
Features provided under previews may have additional limits, availability restrictions, or [terms][1].
|
2022-08-14 11:31:37 +03:00
|
|
|
By default, PSRule for Azure will not provide recommendations that relate to preview features.
|
|
|
|
To include rules for preview features see [working with baselines][2].
|
|
|
|
|
|
|
|
[1]: https://azure.microsoft.com/support/legal/preview-supplemental-terms/
|
|
|
|
[2]: ../../working-with-baselines.md
|
|
|
|
"@
|
|
|
|
|
2022-08-06 10:58:48 +03:00
|
|
|
Section 'Rules' {
|
|
|
|
'The following rules are included in PSRule for Azure.'
|
|
|
|
|
|
|
|
$rules | Sort-Object -Property Ref | Table -Property @{ Name = 'Reference'; Expression = {
|
|
|
|
$_.Ref.Name
|
|
|
|
}}, @{ Name = 'Name'; Expression = {
|
2023-11-30 21:48:34 +03:00
|
|
|
"[$($_.Name)]($($_.Name).md)"
|
2022-08-06 10:58:48 +03:00
|
|
|
}}, Synopsis, @{ Name = 'Release'; Expression = {
|
|
|
|
if ($_.Tag.release -eq 'GA') {
|
|
|
|
'GA'
|
|
|
|
}
|
2024-05-07 09:41:07 +03:00
|
|
|
elseif ($_.Tag.release -eq 'Preview'){
|
2022-08-06 10:58:48 +03:00
|
|
|
'Preview'
|
|
|
|
}
|
2024-05-07 09:41:07 +03:00
|
|
|
else {
|
|
|
|
$_.Tag.release.ToString()
|
|
|
|
}
|
2022-08-06 10:58:48 +03:00
|
|
|
}}
|
|
|
|
}
|
2022-08-14 11:31:37 +03:00
|
|
|
|
|
|
|
'*[GA]: Generally Available — Rules related to a generally available Azure features.'
|
2022-08-06 10:58:48 +03:00
|
|
|
}
|
|
|
|
|
2020-01-05 16:21:55 +03:00
|
|
|
Document 'module' {
|
2021-07-25 11:46:13 +03:00
|
|
|
Title 'Rules by pillar'
|
2019-05-16 18:07:08 +03:00
|
|
|
|
2021-09-18 18:11:04 +03:00
|
|
|
Metadata @{
|
|
|
|
generated = $True
|
|
|
|
}
|
|
|
|
|
2021-06-17 16:55:40 +03:00
|
|
|
Import-Module ./out/modules/PSRule.Rules.Azure
|
2020-01-05 16:21:55 +03:00
|
|
|
$rules = Get-PSRule -Module PSRule.Rules.Azure -Baseline Azure.All -WarningAction SilentlyContinue |
|
|
|
|
Add-Member -MemberType ScriptProperty -Name Category -Value { $this.Info.Annotations.category } -PassThru |
|
2020-08-28 06:27:27 +03:00
|
|
|
Add-Member -MemberType ScriptProperty -Name Pillar -Value { $this.Info.Annotations.pillar } -PassThru |
|
|
|
|
Sort-Object -Property Pillar, Category;
|
2020-01-05 16:21:55 +03:00
|
|
|
|
2020-08-28 06:27:27 +03:00
|
|
|
'PSRule for Azure includes the following rules across five pillars of the Microsoft Azure Well-Architected Framework.'
|
2020-01-05 16:21:55 +03:00
|
|
|
|
2020-08-28 06:27:27 +03:00
|
|
|
$pillars = $rules | Group-Object -Property Pillar | Sort-Object -Property Name;
|
2020-01-05 16:21:55 +03:00
|
|
|
|
2020-08-28 06:27:27 +03:00
|
|
|
foreach ($pillar in $pillars) {
|
|
|
|
Section $pillar.Name {
|
|
|
|
$categories = $pillar.Group | Group-Object -Property Category | Sort-Object -Property Name;
|
2020-01-05 16:21:55 +03:00
|
|
|
|
2020-08-28 06:27:27 +03:00
|
|
|
foreach ($category in $categories) {
|
|
|
|
Section $category.Name {
|
|
|
|
$category.Group |
|
2023-11-30 21:48:34 +03:00
|
|
|
Sort-Object -Property Name |
|
2020-08-28 06:27:27 +03:00
|
|
|
Table -Property @{ Name = 'Name'; Expression = {
|
2023-11-30 21:48:34 +03:00
|
|
|
"[$($_.Name)]($($_.Name).md)"
|
2020-08-28 06:27:27 +03:00
|
|
|
}}, Synopsis, @{ Name = 'Severity'; Expression = {
|
|
|
|
$_.Info.Annotations.severity
|
2022-08-06 10:58:48 +03:00
|
|
|
}}, @{ Name = 'Level'; Expression = {
|
|
|
|
$_.Level.ToString()
|
2020-08-28 06:27:27 +03:00
|
|
|
}}
|
|
|
|
}
|
2020-01-05 16:21:55 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-05-16 18:07:08 +03:00
|
|
|
}
|
2020-04-12 08:17:49 +03:00
|
|
|
|
|
|
|
Document 'resource' {
|
2021-07-25 11:46:13 +03:00
|
|
|
Title 'Rules by resource type'
|
2020-04-12 08:17:49 +03:00
|
|
|
|
2021-09-18 18:11:04 +03:00
|
|
|
Metadata @{
|
|
|
|
generated = $True
|
|
|
|
}
|
|
|
|
|
2021-06-17 16:55:40 +03:00
|
|
|
Import-Module ./out/modules/PSRule.Rules.Azure
|
2020-04-12 08:17:49 +03:00
|
|
|
$rules = Get-PSRule -Module PSRule.Rules.Azure -Baseline Azure.All -WarningAction SilentlyContinue |
|
|
|
|
Add-Member -MemberType ScriptProperty -Name Resource -Value { $this.Info.Annotations.resource } -PassThru |
|
|
|
|
Sort-Object -Property Resource;
|
|
|
|
|
2021-07-25 11:46:13 +03:00
|
|
|
'PSRule for Azure includes the following rules organized by resource type.'
|
2020-04-12 08:17:49 +03:00
|
|
|
|
2021-07-25 11:46:13 +03:00
|
|
|
$resources = $rules | Group-Object -Property Resource;
|
2020-04-12 08:17:49 +03:00
|
|
|
|
2021-07-25 11:46:13 +03:00
|
|
|
foreach ($resource in $resources) {
|
|
|
|
Section "$($resource.Name)" {
|
|
|
|
$resource.Group |
|
2023-11-30 21:48:34 +03:00
|
|
|
Sort-Object -Property Name |
|
2021-07-25 11:46:13 +03:00
|
|
|
Table -Property @{ Name = 'Name'; Expression = {
|
2023-11-30 21:48:34 +03:00
|
|
|
"[$($_.Name)]($($_.Name).md)"
|
2021-07-25 11:46:13 +03:00
|
|
|
}}, Synopsis, @{ Name = 'Severity'; Expression = {
|
|
|
|
$_.Info.Annotations.severity
|
2022-08-06 10:58:48 +03:00
|
|
|
}}, @{ Name = 'Level'; Expression = {
|
|
|
|
$_.Level.ToString()
|
2021-07-25 11:46:13 +03:00
|
|
|
}}
|
2020-04-12 08:17:49 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|