tyconsulting / azurepolicy

MIT License
146 stars 132 forks source link

azurepolicy.bastion-la.json contains diagnostics for Microsoft.Web/sites #6

Closed Astashin closed 2 years ago

Astashin commented 4 years ago

Seems like copy-paste for web apps without changing config for bastion. Below are correct fields for policy definition:

        "policyRule": {
          "if": {
            "field": "type",
            "equals": "Microsoft.Network/bastionHosts"
          },

Resource type:

"resources": [
                      {
                        "type": "Microsoft.Network/bastionHosts/providers/diagnosticSettings",

Log and metrics config:

                          "metrics": [],
                          "logs": [
                            {
                              "category": "BastionAuditLogs",
                              "enabled": true
                            }
tyconsulting commented 2 years ago

resolved - using log category group instead