Skip to content

fix(misconf): skip AZU-0021 for PostgreSQL flexible servers 18 and later #11733

Backlog

Description

@nikpivkin

Azure Database for PostgreSQL flexible servers have the connection_throttle.enable parameter only in PostgreSQL 11 to 17. Version 18 does not have it, and Azure deprecated its built-in policy for this parameter. AZU-0021 does not know the server version, so it fails for every flexible server on version 18 or later, and no configuration can fix it.

resource "azurerm_postgresql_flexible_server" "example" {
  name    = "example"
  version = "18"
}
FAIL: AZU-0021 (MEDIUM): Database server is not configured to throttle connections.

Trivy should read the server version and skip AZU-0021 for version 18 and later.

  • The Terraform adapter reads version of azurerm_postgresql_flexible_server.
  • The ARM adapter reads properties.version of Microsoft.DBforPostgreSQL/flexibleServers.
  • AZU-0021 skips servers with version 18 or later. When the version is not set, the check works as now, because the version then comes from the source server or the existing server in Azure.

References:

Activity

  1. added
    kind/bug
    scan/misconfiguration
    good first issue
    on Nov 24, 2026
  2. socrabs151 commented on Nov 24, 2026

    @socrabs151

    Taking this. I'll update the Terraform and ARM adapters to expose the PostgreSQL flexible-server version and make AZU-0021 skip version 18 and later, with regression coverage for both source types.

  3. socrabs151 commented on Nov 24, 2026

    @socrabs151

    Before coding, I found #11717 open, adding ARM support for PostgreSQL/MySQL flexible servers. The ARM part of this issue depends on that adapter work. I'll hold this until #11717 lands rather than duplicating it; the Terraform side can follow once the adapter shape is settled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuekind/bugscan/misconfiguration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions