Skip to content

Conversation

@yagreut
Copy link
Contributor

@yagreut yagreut commented Nov 17, 2025

Update Azure Database schema for new checks

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@nikpivkin
Copy link
Contributor

Hi @yagreut!

I moved the code related to CosmosDB to a separate cosmosdb package, as it is a separate service in Azure.

@nikpivkin
Copy link
Contributor

You are adding parsing for new fields in azurerm_mysql_server and mariadb_server, which have been deprecated for several years. Does this make sense? MariaDB support is being fully discontinued this year, and for azurerm_mysql_server, migration to azurerm_mysql_flexible_server is recommended. Perhaps it would be better to focus on supporting current resources rather than deprecated ones.

@nikpivkin
Copy link
Contributor

You are adding parsing for new fields in azurerm_mysql_server and mariadb_server, which have been deprecated for several years. Does this make sense? MariaDB support is being fully discontinued this year, and for azurerm_mysql_server, migration to azurerm_mysql_flexible_server is recommended. Perhaps it would be better to focus on supporting current resources rather than deprecated ones.

I created an issue to track it.

@simar7
Copy link
Member

simar7 commented Nov 26, 2025

You are adding parsing for new fields in azurerm_mysql_server and mariadb_server, which have been deprecated for several years. Does this make sense? MariaDB support is being fully discontinued this year, and for azurerm_mysql_server, migration to azurerm_mysql_flexible_server is recommended. Perhaps it would be better to focus on supporting current resources rather than deprecated ones.

I created an issue to track it.

@nikpivkin @yagreut Maybe I'm not following, if the services are deprecated why are we adding checks for them? IIUC, the issue you made is to move the parsing to use flexible fields, why not just add them from the start rather than add deprecated services?

Comment on lines 84 to 89
threatDetectionEnabled := properties.GetMapValue("threatDetectionPolicy").GetMapValue("state")

if threatDetectionEnabled.Kind == azure.KindNull {
// Try alternative property paths
threatDetectionEnabled = properties.GetMapValue("securityAlertPolicy").GetMapValue("state")
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not find these properties in the resource Microsoft.DBforPostgreSQL/servers. If I'm not mistaken, the security policy is configured via Microsoft.DBforPostgreSQL/servers/securityAlertPolicies, but so far we can't search for related resources for ARM.

@simar7
Copy link
Member

simar7 commented Dec 4, 2025

@nikpivkin is this ready to be merged or are there still pending changes that we need to do?

@nikpivkin
Copy link
Contributor

nikpivkin commented Dec 4, 2025

@simar7 I forgot to submit the review :)

@simar7 simar7 added this pull request to the merge queue Dec 5, 2025
Merged via the queue into aquasecurity:main with commit 48dfede Dec 5, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants