Skip to content
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

azurerm_sentinel_alert_rule_nrt support for event_grouping block #18754

Closed
1 task done
kevkele opened this issue Oct 13, 2022 · 2 comments
Closed
1 task done

azurerm_sentinel_alert_rule_nrt support for event_grouping block #18754

kevkele opened this issue Oct 13, 2022 · 2 comments
Labels
enhancement sdk/not-yet-supported Support for this does not exist in the upstream SDK at this time service/sentinel

Comments

@kevkele
Copy link

kevkele commented Oct 13, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 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

Description

The azurerm_sentinel_alert_rule_nrt resource introduced in #15999 from issue #14973 doesn't yet support the event_grouping block found in sentinel_alert_rule_scheduled. event_grouping is an option under Sentinel's NRT rules.

Under azurerm version 3.24.0, we see the error:

Error: Unsupported block type

  on rules-example.tf line 600, in resource "azurerm_sentinel_alert_rule_nrt" "example":
 600:   event_grouping {

Blocks of type "event_grouping" are not expected here.

New or Affected Resource(s)/Data Source(s)

azurerm_sentinel_alert_rule_nrt

Potential Terraform Configuration

resource "azurerm_sentinel_alert_rule_nrt" "example" {
  name                       = "example"
  log_analytics_workspace_id = azurerm_log_analytics_solution.example.workspace_resource_id
  display_name               = "example"
  severity                   = "High"
  query                      = <<QUERY
AzureActivity |
  where OperationName == "Create or Update Virtual Machine" or OperationName =="Create Deployment" |
  where ActivityStatus == "Succeeded" |
  make-series dcount(ResourceId) default=0 on EventSubmissionTimestamp in range(ago(7d), now(), 1d) by Caller
QUERY

  event_grouping {
    aggregation_method = "AlertPerResult"
  }

}

References

@magodo
Copy link
Collaborator

magodo commented Oct 14, 2022

This new property is introduced in API version 2022-09-01-preview, while the current API version under used is 2022-01-01-preview. The Azure SDK track1 is feature frozen, and its latest version is 2022-01-01-preview. We are migrating the underlying SDK from Azure SDK track1 to the hashicorp/go-azure-sdk, whilst there is some internal issue blocking this migration for now.

@magodo magodo added the sdk/not-yet-supported Support for this does not exist in the upstream SDK at this time label Oct 14, 2022
@kevkele
Copy link
Author

kevkele commented Apr 11, 2023

Chiming in to say that this was added in #20231

@kevkele kevkele closed this as completed Apr 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement sdk/not-yet-supported Support for this does not exist in the upstream SDK at this time service/sentinel
Projects
None yet
Development

No branches or pull requests

2 participants