Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Policy (Azure Database for PostgreSQL flexible servers): PostgreSQL flexible servers should log checkpoints #440

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "7a2deb93-6f4f-4668-8697-be314e342085",
"type": "Microsoft.Authorization/policyDefinitions",
"properties": {
"displayName": "PostgreSQL flexible servers should log checkpoints",
"description": "This policy helps audit any PostgreSQL databases in your environment without log_checkpoints setting enabled.",
"metadata": {
"version": "1.0.0",
"category": "SQL"
},
"mode": "All",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "AuditIfNotExists or Disabled the execution of the Policy"
},
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"defaultValue": "AuditIfNotExists"
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.DBforPostgreSQL/flexibleServers"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.DBforPostgreSQL/flexibleServers/configurations",
"name": "log_checkpoints",
"existenceCondition": {
"field": "Microsoft.DBforPostgreSQL/flexibleServers/configurations/value",
"equals": "ON"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "AuditIfNotExists or Disabled the execution of the Policy"
},
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"defaultValue": "AuditIfNotExists"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"if": {
"field": "type",
"equals": "Microsoft.DBforPostgreSQL/flexibleServers"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.DBforPostgreSQL/flexibleServers/configurations",
"name": "log_checkpoints",
"existenceCondition": {
"field": "Microsoft.DBforPostgreSQL/flexibleServers/configurations/value",
"equals": "ON"
}
}
}
}
Loading