Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
Description
currently the resource azurerm_mssql_server_extended_auditing_policy requires the server_id argument which takes the id of an sql server e.g. /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.DBforMySQL/servers/{server-name}
when using a flexible mysql server the id is exported as: /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.DBforMySQL/flexibleServers/{server-name}
when referencing the flexible server id in the auditing policy resource the error produced is 'ID was missing the 'servers' element'.
i cant seem to find any other 'proper' way of updating the audit policy of flexible sql servers
Is there an existing issue for this?
Community Note
Description
currently the resource azurerm_mssql_server_extended_auditing_policy requires the server_id argument which takes the id of an sql server e.g. /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.DBforMySQL/servers/{server-name}
when using a flexible mysql server the id is exported as: /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.DBforMySQL/flexibleServers/{server-name}
when referencing the flexible server id in the auditing policy resource the error produced is 'ID was missing the 'servers' element'.
i cant seem to find any other 'proper' way of updating the audit policy of flexible sql servers
New or Affected Resource(s)/Data Source(s)
azurerm_mssql_server_extended_auditing_policy
Potential Terraform Configuration
resource "azurerm_mysql_flexible_server_auditing_policy" "example" { server_id = azurerm_mysql_flexible_server.example.id blob_storage_endpoint = azurerm_storage_account.example.primary_blob_endpoint storage_account_access_key = azurerm_storage_account.example.primary_access_key }
References
No response