MEDIUM
Source
Trivy
ID
AVD-AZU-0020

SSL should be enforced on database connections where applicable

SSL connections should be enforced were available to ensure secure transfer and reduce the risk of compromising data in flight.

Impact

Insecure connections could lead to data loss and other vulnerabilities

Follow the appropriate remediation steps below to resolve the issue.

Enable SSL enforcement

1
2
3
4
5
6
7
8
 resource "azurerm_postgresql_server" "good_example" {
   name                = "good_example"
 
   public_network_access_enabled    = false
   ssl_enforcement_enabled          = true
   ssl_minimal_tls_version_enforced = "TLS1_2"
 }