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

New resource: azurerm_sentinel_alert_rule_fusion #9829

Merged
merged 4 commits into from
Dec 30, 2020

Conversation

neil-yechenwei
Copy link
Contributor

@neil-yechenwei neil-yechenwei commented Dec 11, 2020

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)

Copy link
Collaborator

@katbyte katbyte left a 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


* `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.
Copy link
Collaborator

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

Suggested change
* `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

Suggested change
* `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.

Copy link
Contributor Author

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.

@neil-yechenwei
Copy link
Contributor Author

@katbyte , thanks for your comment. I've updated code per your suggestions.

Copy link
Collaborator

@katbyte katbyte left a 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 👍

@katbyte katbyte added this to the v2.42.0 milestone Dec 30, 2020
@katbyte katbyte merged commit 55e961d into hashicorp:master Dec 30, 2020
katbyte added a commit that referenced this pull request Dec 30, 2020
@ghost
Copy link

ghost commented Jan 8, 2021

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 ...

@ghost
Copy link

ghost commented Jan 29, 2021

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Jan 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants