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

flexibility to create smart_detector_alert_rule with out action #17066

Open
1 task done
srinireddya opened this issue Jun 1, 2022 · 1 comment
Open
1 task done

flexibility to create smart_detector_alert_rule with out action #17066

srinireddya opened this issue Jun 1, 2022 · 1 comment

Comments

@srinireddya
Copy link

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

We enabled smart detection rules and we would like to disable the actions for lower environments and as per document terraform is expecting action group. We went a head and tried with out providing the action block, the error we are getting is "│ At least 1 "action_group" blocks are required".
We can disable the actions for smart detection alert rules through console, but not through terraform.

Terraform Version

1.2.0

AzureRM Provider Version

3.8.0

Affected Resource(s)/Data Source(s)

App Insights Alerts

Terraform Configuration Files

resource "azurerm_monitor_smart_detector_alert_rule" "detector_alert_rules" {

  for_each = toset(["RequestPerformanceDegradationDetector", "DependencyPerformanceDegradationDetector", "ExceptionVolumeChangedDetector"])

  name                = "${each.value}-smart-actions"
  resource_group_name = resource_group_name
  severity            = "Sev3"
  scope_resource_ids  = [data.azurerm_application_insights.application_insights.id]
  frequency           = local.detector_type[each.value].frequency
  detector_type       = each.value
  
  
}

Debug Output/Panic Output

At least 1 "action_group" blocks are required.
╵
╷
│ Error: Insufficient action_group blocks

Expected Behaviour

Should create with out actions

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@srinireddya srinireddya added the bug label Jun 1, 2022
@github-actions github-actions bot removed the bug label Jun 1, 2022
@teowa
Copy link
Contributor

teowa commented Jun 15, 2022

Thanks for the issue. I have checked the REST API specification of the Smart Detection Alert Rule resource, action group is a required property thus cannot be omitted. To disable the actions for Smart Detection Alert Rule, maybe we can use enabled property. If you have further foundings, feel free to reply here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants