-
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
New resource/data source: azurerm_sentinel_alert_rule_ms_security_incident
#6606
New resource/data source: azurerm_sentinel_alert_rule_ms_security_incident
#6606
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.
Hey @magodo, this looks pretty good! Just a couple minor things and I think we can get it in
azurerm/internal/services/sentinel/parse/sentinel_alert_rules.go
Outdated
Show resolved
Hide resolved
"text_whitelist": { | ||
Type: schema.TypeSet, | ||
Optional: true, | ||
Elem: &schema.Schema{Type: schema.TypeString}, |
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.
Can we add additional validation here?
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.
Will add a StringIsNotEmpty
as validation.
azurerm/internal/services/sentinel/resource_arm_sentinel_alert_rule_ms_security_incident.go
Outdated
Show resolved
Hide resolved
|
||
~> **NOTE** At least one of the severity filters need to be set. | ||
|
||
--- |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
This file is generated via make scaffold-website
. This span line seems used to split required attributes and optional attributes. Do you mind check if this is really redundant? If so, then I think I can submit another PR to remove this span line from the tooling.
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.
Ahhh, I see. We add the span line when defining what attributes go into blocks so I believe it should be removed here.
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.
Ah, after chatting internally, it seems like this is the way we're moving going forward. Apologies for calling it out!
@mbfrahry Thank you for your comment! I have updated code accordingly, except for the change in document file, wanna get your confirmation. Test Result💤 via 🦉 v1.14.2 make testacc TEST=./azurerm/internal/services/sentinel/tests TESTARGS="-run='TestAccAzureRMSentinelAlertRuleMsSecurityIncident_update'"
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
TF_ACC=1 go test ./azurerm/internal/services/sentinel/tests -v -run='TestAccAzureRMSentinelAlertRuleMsSecurityIncident_update' -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN TestAccAzureRMSentinelAlertRuleMsSecurityIncident_update
=== PAUSE TestAccAzureRMSentinelAlertRuleMsSecurityIncident_update
=== CONT TestAccAzureRMSentinelAlertRuleMsSecurityIncident_update
--- PASS: TestAccAzureRMSentinelAlertRuleMsSecurityIncident_update (307.07s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/sentinel/tests 307.082s |
23361c6
to
70ba52e
Compare
I re-base my commits onto master branch to make the CI pass. |
azurerm_sentinel_alert_rule_ms_security_incident
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.
LGTM!
This has been released in version 2.8.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.8.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! |
This PR implement one of the alert rule resource required in #6448.
Test Result