feat(query): implements "Beta - Resource Without Diagnostic Settings" #7793
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.








Reason for Proposed Changes
Currently there is no query to ensure that resources that can be associated to a "azurerm_monitor_diagnostic_setting" resource have said association in place.
Quoting CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0 page 194: "
A diagnostic setting controls how a diagnostic log is exported. By default, logs are retained only for 90 days. Diagnostic settings should be defined so that logs can be exported and stored for a longer duration to analyze security activities within an Azure subscription.Additionally, page 194 states : "
Settings should be configured for all appropriate resources for your environment."The initial list of resources that will be supported is as follows:
Proposed Changes
I submit this contribution under the Apache-2.0 license.