Skip to content

Commit b3ab563

Browse files
authored
Complete pillar metadata (Azure#2707)
1 parent 38f8acc commit b3ab563

8 files changed

+23
-21
lines changed

.ps-rule/Rule.Rule.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Rule 'Rule.Pillar' -Type 'PSRule.Rules.Rule' {
5454
}
5555

5656
# Synopsis: Add tag to rules for a valid Well-Architected Framework pillar.
57-
Rule 'Rule.PillarTag' -Type 'PSRule.Rules.Rule' -Level Warning {
57+
Rule 'Rule.PillarTag' -Type 'PSRule.Rules.Rule' {
5858
$Assert.In($TargetObject, 'Tag.''Azure.WAF/pillar''', @(
5959
# English
6060
'Cost Optimization'

.vscode/markdown.code-snippets

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Azure rule documentation",
66
"body": [
77
"---",
8-
"reviewed: 2023-mm-dd",
8+
"reviewed: 2024-mm-dd",
99
"severity: ${4:severity}",
1010
"pillar: ${5:pillar}",
1111
"category: ${6:category}",

.vscode/powershell.code-snippets

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Rule definition for Azure",
66
"body": [
77
"# Synopsis: ${2}",
8-
"Rule '${1}' -Type '${3}' -Tag @{ release = ''; ruleSet = ''; } {",
8+
"Rule '${1}' -Type '${3}' -Tag @{ release = ''; ruleSet = ''; 'Azure.WAF/pillar' = ''; } {",
99
"\t$0",
1010
"}"
1111
]

docs/en/rules/Azure.MySQL.UseFlexible.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
severity: Important
3-
pillar: Operational Excellence
4-
category: Infrastructure provisioning
3+
pillar: Reliability
4+
category: RE:05 Redundancy
55
resource: Azure Database for MySQL
66
online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.MySQL.UseFlexible/
77
---
@@ -14,17 +14,18 @@ Use Azure Database for MySQL Flexible Server deployment model.
1414

1515
## DESCRIPTION
1616

17-
Azure Database for MySQL Single Server is on the retirement path. Upgrade to Azure Database for MySQL Flexible Server.
17+
Azure Database for MySQL Single Server is on the retirement path.
18+
Upgrade to Azure Database for MySQL Flexible Server.
1819

1920
Azure Database for MySQL Flexible Server provides additional options for resilience and scalability above the Single Server deployment model.
2021

2122
## RECOMMENDATION
2223

23-
Migrate to Azure Database for MySQL Flexible Server deployment model.
24+
Consider migrating to Azure Database for MySQL Flexible Server deployment model.
2425

2526
## LINKS
2627

27-
- [Infrastructure provisioning](https://learn.microsoft.com/azure/architecture/framework/devops/automation-infrastructure)
28+
- [RE:05 Redundancy](https://learn.microsoft.com/azure/well-architected/reliability/redundancy)
2829
- [Azure Database for MySQL Single Server deployment model retirement](https://learn.microsoft.com/azure/mysql/single-server/whats-happening-to-mysql-single-server)
2930
- [Migrate from Single Server to Flexible Server](https://learn.microsoft.com/azure/mysql/single-server/whats-happening-to-mysql-single-server#migrate-from-single-server-to-flexible-server)
3031
- [Comparing the MySQL deployment options in Azure](https://learn.microsoft.com/azure/mysql/single-server/select-right-deployment-type#comparing-the-mysql-deployment-options-in-azure)

docs/en/rules/Azure.RSV.StorageType.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ The following geo-replicated options are available for recovery services vaults:
2929

3030
Consider using GeoRedundant for recovery services vaults that contain data.
3131

32-
3332
## EXAMPLES
3433

3534
### Configure with Azure template
36-
The default storage type used by Recovery Services vaults is Geo-redundant. However if you're
37-
defining the backup config in an ARM template:
35+
36+
The default storage type used by Recovery Services vaults is Geo-redundant.
37+
However if you're defining the backup config in an ARM template:
3838

3939
- Set `properties.storageType` to either `GeoRedundant` or `ReadAccessGeoZoneRedundant`.
4040
For example:
@@ -53,8 +53,9 @@ For example:
5353
```
5454

5555
### Configure with Bicep
56-
The default storage type used by Recovery Services vaults is Geo-redundant. However if you're
57-
defining the backup config via Bicep:
56+
57+
The default storage type used by Recovery Services vaults is Geo-redundant.
58+
However if you're defining the backup config via Bicep:
5859

5960
- Set `properties.storageType` to either `GeoRedundant` or `ReadAccessGeoZoneRedundant`.
6061

@@ -73,7 +74,7 @@ resource testRecoveryServices 'Microsoft.RecoveryServices/vaults/backupconfig@20
7374

7475
## LINKS
7576

76-
- [Recovery Services Vault - Overview](https://docs.microsoft.com/azure/backup/backup-azure-recovery-services-vault-overview#storage-settings-in-the-recovery-services-vault)
77-
- [Recovery Services Vault - Storage Settings](https://docs.microsoft.com/azure/backup/backup-create-rs-vault#set-storage-redundancy)
78-
- [Azure deployment reference](https://docs.microsoft.com/azure/templates/microsoft.recoveryservices/vaults/backupconfig?tabs=bicep)
79-
- [Well Architected Framework - Reliability](https://learn.microsoft.com/azure/architecture/framework/resiliency/design-resiliency)
77+
- [RE:05 Redundancy](https://learn.microsoft.com/azure/well-architected/reliability/redundancy)
78+
- [Recovery Services Vault - Overview](https://learn.microsoft.com/azure/backup/backup-azure-recovery-services-vault-overview#storage-settings-in-the-recovery-services-vault)
79+
- [Recovery Services Vault - Storage Settings](https://learn.microsoft.com/azure/backup/backup-create-recovery-services-vault#set-storage-redundancy)
80+
- [Azure deployment reference](https://learn.microsoft.com/azure/templates/microsoft.recoveryservices/vaults/backupconfig)

src/PSRule.Rules.Azure/rules/Azure.MySQL.Rule.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Rule 'Azure.MySQL.GeoRedundantBackup' -Ref 'AZR-000323' -Type 'Microsoft.DBforMy
5656
}
5757

5858
# Synopsis: Use Azure Database for MySQL Flexible Server deployment model.
59-
Rule 'Azure.MySQL.UseFlexible' -Ref 'AZR-000325' -Type 'Microsoft.DBforMySQL/flexibleServers', 'Microsoft.DBforMySQL/servers' -Level Warning -Tag @{ release = 'GA'; ruleSet = '2022_12'; } {
59+
Rule 'Azure.MySQL.UseFlexible' -Ref 'AZR-000325' -Type 'Microsoft.DBforMySQL/flexibleServers', 'Microsoft.DBforMySQL/servers' -Level Warning -Tag @{ release = 'GA'; ruleSet = '2022_12'; 'Azure.WAF/pillar' = 'Reliability'; } {
6060
$Assert.Create($PSRule.TargetType -eq 'Microsoft.DBforMySQL/flexibleServers', $LocalizedData.SingleDeploymentModelRetirement)
6161
}
6262

src/PSRule.Rules.Azure/rules/Azure.RSV.Rule.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77

88
# Synopsis: Recovery Services Vault (RSV) not using geo-replicated storage (GRS) may be at risk.
9-
Rule 'Azure.RSV.StorageType' -Ref 'AZR-000170' -Type 'Microsoft.RecoveryServices/vaults', 'Microsoft.RecoveryServices/vaults/backupconfig' -Tag @{ release = 'GA'; ruleSet = '2022_03' } {
9+
Rule 'Azure.RSV.StorageType' -Ref 'AZR-000170' -Type 'Microsoft.RecoveryServices/vaults', 'Microsoft.RecoveryServices/vaults/backupconfig' -Tag @{ release = 'GA'; ruleSet = '2022_03'; 'Azure.WAF/pillar' = 'Reliability'; } {
1010
$backupConfig = @($TargetObject);
1111
if ($PSRule.TargetType -eq 'Microsoft.RecoveryServices/vaults') {
1212
$backupConfig = @(GetSubResources -ResourceType 'Microsoft.RecoveryServices/vaults/backupconfig');
@@ -28,7 +28,7 @@ Rule 'Azure.RSV.StorageType' -Ref 'AZR-000170' -Type 'Microsoft.RecoveryServices
2828
}
2929

3030
# Synopsis: Recovery Services Vault (RSV) without a replication alert may be at risk.
31-
Rule 'Azure.RSV.ReplicationAlert' -Ref 'AZR-000171' -Type 'Microsoft.RecoveryServices/vaults', 'Microsoft.RecoveryServices/vaults/replicationAlertSettings' -Tag @{ release = 'GA'; ruleSet = '2022_03' } {
31+
Rule 'Azure.RSV.ReplicationAlert' -Ref 'AZR-000171' -Type 'Microsoft.RecoveryServices/vaults', 'Microsoft.RecoveryServices/vaults/replicationAlertSettings' -Tag @{ release = 'GA'; ruleSet = '2022_03'; 'Azure.WAF/pillar' = 'Reliability'; } {
3232
$replicationAlert = @($TargetObject);
3333
if ($PSRule.TargetType -eq 'Microsoft.RecoveryServices/vaults') {
3434
$replicationAlert = @(GetSubResources -ResourceType 'Microsoft.RecoveryServices/vaults/replicationAlertSettings');

src/PSRule.Rules.Azure/rules/Azure.SQL.Rule.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Rule 'Azure.SQL.AAD' -Ref 'AZR-000188' -Type 'Microsoft.Sql/servers', 'Microsoft
7979
}
8080

8181
# Synopsis: Azure SQL logical server names should meet naming requirements.
82-
Rule 'Azure.SQL.ServerName' -Ref 'AZR-000190' -Type 'Microsoft.Sql/servers' -Tag @{ release = 'GA'; ruleSet = '2020_12'; } {
82+
Rule 'Azure.SQL.ServerName' -Ref 'AZR-000190' -Type 'Microsoft.Sql/servers' -Tag @{ release = 'GA'; ruleSet = '2020_12'; 'Azure.WAF/pillar' = 'Operational Excellence'; } {
8383
# https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftsql
8484

8585
# Between 1 and 63 characters long

0 commit comments

Comments
 (0)