-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for enable ms-support auditing #18607
Comments
I'll take a quick look! |
Thanks. I forgot to write that it is relates to Azure mssql server :) |
@MichalSino If you know how to build the provider yourselves locally, feel free to check out the PR and get a feel if this is working for you! The reason I'm proposing this is because I've the experience that the configuration of auditing on SQL might be a bit more complicated than it seems at first sight. |
@aristosvo Thanks for quick reply. Unfortunately I've never written provider, so I don't know how to do it. I've read this pull request and I think it is not full solution, because in cli we can use those 2 commands (and they do 2 different things, but similar): This is what you mentioned: And this is what I found in docs: Someone from MS should write which one is correct. ;) I can't find the difference in API, but second one works better in my case. But thanks for reply. I will wait for this. :) |
@MichalSino Thanks for your pointers! Enhanced the resource to a separate one, which indeed uses different APIs and works better. I'll run some tests and add some docs, let's get it going! |
@aristosvo great. I will wait for good news. :) Thanks a lot. |
Regarding Auditing of Microsoft Support operations for your logical server allows you to audit Microsoft support engineers' operations when they need to access your server during a support request. The use of this capability, along with your auditing, enables more transparency into your workforce and allows for anomaly detection, trend visualization, and data loss prevention. Source: Auditing of Microsoft Support operations (September 2022) |
I know what does it mean. :) The question is which method is better to set up it and why. ;) |
As I said earlier I know it. :) But we can also set it up using az sql server audit-policy update -g ${data.azurerm_resource_group.rg.name} -n ${azurerm_mssql_server.server.name} --set isDevopsAuditEnabled=true --lats Enabled --lawr ${azurerm_log_analytics_workspace.law.id} |
Looking at the |
So, you suggest to use first one if we want to enable Ms support auditing and second one if we want to change the destination of those logs, right? |
To enable SQL auditing, you have to run If you want to enable the auditing of Microsoft support operations, I think that you have to run the following: |
But what is isDevOpsauditEnabled=true for in |
There is a IsDevopsAuditEnabled property, but it's for the Azure SDK for .NET: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.management.sql.models.serverblobauditingpolicy.isdevopsauditenabled. |
This functionality has been released in v3.30.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Is there an existing issue for this?
Community Note
Description
There is not possibility to set "Enable Auditing of Microsoft support operations" and "Use different audit log destinations" through azurerm provider. Is it possible to add this feature to azurerm_mssql_server_extended_auditing_policy or create new resource like above? After creating resource we could set destination in diagnostic_settings (like with extended auditing policy).
New or Affected Resource(s)/Data Source(s)
azurerm_mssql_server_mssupport_auditing_policy
Potential Terraform Configuration
References
No response
The text was updated successfully, but these errors were encountered: