-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
New Resource - azurerm_monitor_aad_diagnostic_setting
#11660
New Resource - azurerm_monitor_aad_diagnostic_setting
#11660
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @magodo, thanks for this PR! I've taken a look through and tried it out, it mostly LGTM and the tests are passing.
I noticed one filename azurerm/internal/services/monitor/parse/monitor_aad_diagnositc_setting_test.go
has a typo in it. Are you able to generate ID parsers/formatters for this resource?
I've also left a few suggestions inline, if you can take a look at those then this should be good to merge. Thanks!
azurerm/internal/services/monitor/monitor_aad_diagnostic_setting_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/monitor/monitor_aad_diagnostic_setting_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/monitor/monitor_aad_diagnostic_setting_resource.go
Show resolved
Hide resolved
azurerm/internal/services/monitor/monitor_aad_diagnostic_setting_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/monitor/monitor_aad_diagnostic_setting_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/monitor/monitor_aad_diagnostic_setting_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/monitor/monitor_aad_diagnostic_setting_resource.go
Outdated
Show resolved
Hide resolved
@manicminer Thank you for the review! I've updated most of the comments, but leave some for open discussion. Please take another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @magodo! This LGTM and tests still passing
This has been released in version 2.59.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.59.0"
}
# ... other configuration ... |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR implements a new resource:
azurerm_monitor_aad_diagnostic_setting
.This is the same as the
azurerm_monitor_diagnostic_setting
in most parts, except it is using a different API endpoint:/providers/microsoft.aadiam/diagnosticSettings/{name}
. I've verified this endpoint is not a wrapper API (at least from the API level) for the monitor one -/providers/microsoft.aadiam/diagnosticSettings/providers/microsoft.insights/diagnosticSettings/{name}
, hence decided to create this separate resource.Another point worth mentioning is that the data source to query the available log categories for AAD (which is analogous to the
azuerm_monitor_diagnostic_catagories
) is currently blocked due to Azure/azure-rest-api-specs#14355.Fixes: #11565
Test
The test below was running via the user account in my local. This is because the SP seems has no permission to read the AAD's diagnostic setting. Please let me know whether it makes sense to skip the acctest for now until there is a way to run these tests via the SP.