/
Azure.PublicIP.Rule.yaml
68 lines (60 loc) · 1.4 KB
/
Azure.PublicIP.Rule.yaml
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
65
66
67
68
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# Validation rules for public IP addresses
#
#region Rules
---
# Synopsis: Public IP addresses should be deployed with Standard SKU for production workloads.
apiVersion: github.com/microsoft/PSRule/v1
kind: Rule
metadata:
name: Azure.PublicIP.StandardSKU
ref: AZR-000158
tags:
release: GA
ruleSet: 2021_12
Azure.WAF/pillar: Reliability
spec:
type:
- Microsoft.Network/publicIPAddresses
condition:
field: sku.name
equals: Standard
---
# Synopsis: Use the Standard SKU for Public IP addresses as the Basic SKU will be retired.
apiVersion: github.com/microsoft/PSRule/v1
kind: Rule
metadata:
name: Azure.PublicIP.MigrateStandard
ref: AZR-000395
tags:
release: GA
ruleSet: 2023_09
Azure.WAF/pillar: Operational Excellence
spec:
type:
- Microsoft.Network/publicIPAddresses
condition:
field: sku.name
equals: Standard
#endregion Rules
#region Selectors
---
# Synopsis: Public IP addresses using the standard SKU that are not excluded.
apiVersion: github.com/microsoft/PSRule/v1
kind: Selector
metadata:
name: Azure.PublicIP.ShouldBeAvailable
metadata:
export: false
spec:
if:
allOf:
- type: '.'
equals: Microsoft.Network/publicIPAddresses
- field: sku.name
equals: Standard
- field: tags.'resource-usage'
notEquals: azure-bastion
#endregion Selectors