-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: deprecate alert_rule event_categories attribute (#545)
* fix: deprecate alert_rule event_categories attribute Signed-off-by: Darren Murray <darren.murray@lacework.net> * fix: deprecate alert_rule event_categories attribute Signed-off-by: Darren Murray <darren.murray@lacework.net> * refactor: code review comments Signed-off-by: Darren Murray <darren.murray@lacework.net> * refactor: code review comments Signed-off-by: Darren Murray <darren.murray@lacework.net> * refactor: code review comments Signed-off-by: Darren Murray <darren.murray@lacework.net> * refactor: code review comments Signed-off-by: Darren Murray <darren.murray@lacework.net> * refactor: code review comments Signed-off-by: Darren Murray <darren.murray@lacework.net> --------- Signed-off-by: Darren Murray <darren.murray@lacework.net>
- Loading branch information
1 parent
5ece5b1
commit e9231c9
Showing
5 changed files
with
198 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
terraform { | ||
required_providers { | ||
lacework = { | ||
source = "lacework/lacework" | ||
} | ||
} | ||
} | ||
|
||
resource "lacework_alert_rule" "example" { | ||
name = var.name | ||
description = var.description | ||
alert_channels = var.channels | ||
severities = var.severities | ||
alert_subcategories = var.alert_subcategories | ||
alert_categories = var.alert_categories | ||
resource_groups = [lacework_resource_group_aws.example.id] | ||
} | ||
|
||
resource "lacework_resource_group_aws" "example" { | ||
name = var.resource_group_name | ||
accounts = ["*"] | ||
} | ||
|
||
variable "resource_group_name" { | ||
type = string | ||
default = "Users for Alert Rules Testing example" | ||
} | ||
|
||
variable "name" { | ||
type = string | ||
default = "Alert Rule" | ||
} | ||
|
||
variable "description" { | ||
type = string | ||
default = "Alert Rule created by Terraform" | ||
} | ||
|
||
variable "channels" { | ||
type = list(string) | ||
default = ["TECHALLY_013F08F1B3FA97E7D54463DECAEEACF9AEA3AEACF863F76"] | ||
} | ||
|
||
variable "severities" { | ||
type = list(string) | ||
default = ["High", "Medium"] | ||
} | ||
|
||
variable "alert_subcategories" { | ||
type = list(string) | ||
default = ["Compliance", "Platform", "User", "Cloud"] | ||
} | ||
|
||
variable "alert_categories" { | ||
type = list(string) | ||
default = ["Policy"] | ||
} | ||
|
||
output "name" { | ||
value = lacework_alert_rule.example.name | ||
} | ||
|
||
output "description" { | ||
value = lacework_alert_rule.example.description | ||
} | ||
|
||
output "channels" { | ||
value = lacework_alert_rule.example.alert_channels | ||
} | ||
|
||
output "severities" { | ||
value = lacework_alert_rule.example.severities | ||
} | ||
|
||
output "alert_subcategories" { | ||
value = lacework_alert_rule.example.alert_subcategories | ||
} | ||
|
||
output "alert_categories" { | ||
value = lacework_alert_rule.example.alert_categories | ||
} | ||
|
||
output "resource_group_id" { | ||
value = lacework_resource_group_aws.example.id | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters