-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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_sentinel_alert_rule_fusion #9829
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.
Thanks @neil-yechenwei - i've left some comments inline that need to be addressed before merge
azurerm/internal/services/sentinel/sentinel_alert_rule_fusion_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/sentinel/sentinel_alert_rule_fusion_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/sentinel/sentinel_alert_rule_fusion_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/sentinel/sentinel_alert_rule_fusion_resource_test.go
Outdated
Show resolved
Hide resolved
|
||
* `log_analytics_workspace_id` - (Required) The ID of the Log Analytics Workspace this Sentinel Fusion Alert Rule belongs to. Changing this forces a new Sentinel Fusion Alert Rule to be created. | ||
|
||
* `alert_rule_template_name` - (Required) The name of the alert rule template which is used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. |
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.
if this can only ever be a guid shouldn't it be
* `alert_rule_template_name` - (Required) The name of the alert rule template which is used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. | |
* `alert_rule_template_id` - (Required) The name of the alert rule template which is used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. |
or
* `alert_rule_template_name` - (Required) The name of the alert rule template which is used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. | |
* `alert_rule_template_guid` - (Required) The name of the alert rule template which is used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. |
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.
alert_rule_template_id likes a resource id. So I prefer to use alert_rule_template_guid to avoid confusion if you don't mind. Thanks for suggestion.
@katbyte , thanks for your comment. I've updated code per your suggestions. |
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 @neil-yechenwei - this LGTM 👍
This has been released in version 2.42.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.42.0"
}
# ... other configuration ... |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Currently, there is no way to create Sentinel Fusion Alert Rule. So I have to submit this PR to implement it.
The overview of Sentinel Fusion Alert Rule:
https://docs.microsoft.com/en-us/azure/sentinel/fusion
API Doc:
https://docs.microsoft.com/en-us/rest/api/securityinsights/alertrules/createorupdate#fusionalertrule
--- PASS: TestAccAzureRMSentinelAlertRuleFusion_basic (168.58s)
--- PASS: TestAccAzureRMSentinelAlertRuleFusion_requiresImport (193.83s)
--- PASS: TestAccAzureRMSentinelAlertRuleFusion_update (311.67s)
--- PASS: TestAccAzureRMSentinelAlertRuleFusion_complete (340.93s)