For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/ansible-azure-postgresql-server-without-connection-throttling.md.
A documentation index is available at /llms.txt.
Connection throttling must be enabled on PostgreSQL servers to limit concurrent connection attempts and prevent resource exhaustion or availability degradation from runaway clients or connection storms.
This rule checks Ansible tasks using the azure.azcollection.azure_rm_postgresqlconfiguration or azure_rm_postgresqlconfiguration module where name equals connection_throttling. The value property must be set to ON (case-insensitive). Resources missing this setting or with value set to OFF (or any value other than ON) are flagged as an incorrect configuration.
Secure Ansible task example:
- name:Enable connection throttling on PostgreSQL serverazure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myPostgresServername:connection_throttlingvalue:ON
Compliant Code Examples
- name:Update PostgreSQL Server settingazure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:on- name:Update PostgreSQL Server setting2azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:On- name:Update PostgreSQL Server setting3azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:ON- name:Update PostgreSQL Server setting4azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:on- name:Update PostgreSQL Server setting5azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:On- name:Update PostgreSQL Server setting6azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:ON
Non-Compliant Code Examples
---- name:Update PostgreSQL Server settingazure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:off- name:Update PostgreSQL Server setting2azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:Off- name:Update PostgreSQL Server setting3azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:OFF- name:Update PostgreSQL Server setting4azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:"off"- name:Update PostgreSQL Server setting5azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:"Off"- name:Update PostgreSQL Server setting6azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:connection_throttlingvalue:"OFF"
1
2
rulesets:- Ansible / Azure # Rules to enforce / Azure.
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.