-
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
r/application_insights: Terraform should remove the automatically created nested items post-creation #10563
Comments
Rather than exposing a flag for this, Terraform should remove the ones being created by default here - since we've got a means of creating these via the new resource (this is an issue across other resources too, for example placeholder data which shouldn't be provisioned by default, but Azure tries to be helpful) |
Any workaround to remove the failure anomalies rule ? |
This has been bugging me for while. We have tons of these "Smart detection" things scattered around in our subscriptions and nobody knows what they are and what to do with them. One problem I see is that terraform provider is only a thin wrapper on top of Azure RM API, and the API for App Insights has no mention of anything "Smart detection". So I'm not sure if the provider team will be able to implement this feature. I'm sad. See here: https://docs.microsoft.com/en-us/rest/api/application-insights/components/create-or-update |
This functionality has been released in v3.0.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. |
Community Note
Description
This issue is a direct followup to #8812 as I think you completly missed the point of that issue.
Whenever a new insights resource is created via
azurerm_application_insights
azure automatically creates an alert rule called "Failure Anomalies" with the condition "Whenever the Failure Anomalies criteria is met" and an action group "Application Insights Smart Detection" which is also automatically created. (NB: It takes several minutes for this rule to show up in the portal after insights is created)As Roshan B pointed out this creates a high volume of undesired alert messages sent to the wrong people.
What Roshan B wanted in his issue was the ability to turn off the creation of that alert rule
What you instead delivered in your fix was the option to create more of them. 😮
To make things worse, that "Failure Anomalies" rule and "Application Insights Smart Detection" alert group are completly outside of terraforms control. They are not accessible as a resource and thus cannot easily be altered (like changing the action group). You have to fiddle with az CLI call and/or ARM templates to get a grip on that alert rule. This is far from the stable automation process I'd like to achieve with terraform.
New or Affected Resource(s)
Potential Terraform Configuration
References
https://docs.microsoft.com/en-us/azure/azure-monitor/app/proactive-failure-diagnostics#how-it-works
The text was updated successfully, but these errors were encountered: