Skip to content

feat(arm): read MySQL and PostgreSQL flexible servers #11715

Open

Description

@nikpivkin

The ARM adapter reads only single servers, Microsoft.DBforMySQL/servers and Microsoft.DBforPostgreSQL/servers. It ignores Microsoft.DBforMySQL/flexibleServers and Microsoft.DBforPostgreSQL/flexibleServers, so the Azure database checks do not run for them. The Terraform adapter already reads azurerm_mysql_flexible_server and azurerm_postgresql_flexible_server.

AZU-0029 does not report the rule that allows all addresses in this template.

[
  {
    "type": "Microsoft.DBforPostgreSQL/flexibleServers",
    "name": "example",
    "properties": {}
  },
  {
    "type": "Microsoft.DBforPostgreSQL/flexibleServers/firewallRules",
    "name": "example/allow-all",
    "properties": {
      "startIpAddress": "0.0.0.0",
      "endIpAddress": "255.255.255.255"
    }
  }
]

Trivy should read these resources, as the Terraform adapter does. Child resources can be nested in the server or declared at the top level.

  • Microsoft.DBforMySQL/flexibleServers
  • Microsoft.DBforMySQL/flexibleServers/firewallRules
  • Microsoft.DBforMySQL/flexibleServers/configurations
  • Microsoft.DBforPostgreSQL/flexibleServers
  • Microsoft.DBforPostgreSQL/flexibleServers/firewallRules
  • Microsoft.DBforPostgreSQL/flexibleServers/configurations

References:

Activity

  1. added
    good first issue
    kind/feature
    scan/misconfiguration
    on Nov 23, 2026
  2. Shaamak commented on Nov 23, 2026

    @Shaamak

    Hi! I'd like to work on this. Could you assign it to me?

    My plan is to follow the Terraform adapter and the recent NSG fix (#11663):

    • Read Microsoft.DBforMySQL/flexibleServers and Microsoft.DBforPostgreSQL/flexibleServers into the existing MySQLServers / PostgreSQLServers lists
    • Pick up firewallRules and configurations child resources, whether they're nested in the server or declared at the top level
    • Add adapter tests that cover both layouts, including the template from this issue (AZU-0029)
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/featurescan/misconfiguration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions