Describe the bug
The "Cloud" item in event_categories for lacework_alert_rule is always sorted to the last item in the list. Will result in perpetual drift for the resource if Terraform doesn't match. Doesn't seem to be the case for any of the other items in event_categories.
To Reproduce
resource "lacework_alert_rule" "jira" {
name = "jira-alert-rule"
description = "This is a test JIRA alert rule"
alert_channels = [lacework_alert_channel_jira_cloud.jira.id]
severities = [
"Critical",
"High",
]
event_categories = [
"App",
"Cloud",
"Compliance",
"File",
"Machine",
"User",
"Platform",
]
}
Terraform apply
Terraform plan
# lacework_alert_rule.jira will be updated in-place
~ resource "lacework_alert_rule" "jira" {
~ event_categories = [
"App",
+ "Cloud",
"Compliance",
# (3 unchanged elements hidden)
"Platform",
- "Cloud",
]
name = "jira-alert-rule"
# (9 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
3. Terraform apply
4. Terraform plan
```terraform
Terraform will perform the following actions:
# lacework_alert_rule.jira will be updated in-place
~ resource "lacework_alert_rule" "jira" {
~ event_categories = [
"App",
+ "Cloud",
"Compliance",
# (3 unchanged elements hidden)
"Platform",
- "Cloud",
]
name = "jira-alert-rule"
# (9 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Expected behavior
Changing the order of event_categories should not result in perpetual drift.
Describe the bug The "Cloud" item in
event_categories
forlacework_alert_rule
is always sorted to the last item in the list. Will result in perpetual drift for the resource if Terraform doesn't match. Doesn't seem to be the case for any of the other items inevent_categories
.To Reproduce
Plan: 0 to add, 1 to change, 0 to destroy.
Expected behavior Changing the order of
event_categories
should not result in perpetual drift.Please complete the following information):