-
Notifications
You must be signed in to change notification settings - Fork 178
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
Alert configuration state is not stable #632
Comments
@guyguy333 let me have the team take a look. |
Internal ticket INTMDB-284 |
@guyguy333 we determined the root cause. You cannot include both sms_enabled and email_enabled unless type_name is GROUP, ORG, or USER. The API will accept the parameters without error but it's why the state mismatches later. However the documentation is unclear on this so we will update that. |
Thanks @themantissa. I read the updated documentation in PR. So yes, in that case, as we're using Opsgenie, we can remove both fields
I think I understand roles issue according to updated documentation and if I understand right, it has no impact for Opsgenie and so should be removed. However, for interval_min, I don't get why this diff is remaining:
resource "mongodbatlas_alert_configuration" "host_alerts" {
for_each = toset(["HOST_DOWN", "NO_PRIMARY", "HOST_MONGOT_CRASHING_OOM"])
project_id = var.project_id
event_type = each.key
enabled = true
notification {
ops_genie_api_key = var.api_token
ops_genie_region = "EU"
type_name = "OPS_GENIE"
interval_min = 5
delay_min = 0
}
} Thanks |
@guyguy333 that's actually a slightly different issue corrected in #624. Will be included in the next release. |
Fixed in 1.2 |
Hello,
We use
mongodbatlas_alert_configuration
to setup our alerts with Opsgenie. It works fine. However, every time we plan / apply without any changes of HCL, terraform detects changes. Moreover, even if we apply, issue remains. I guess resource is not well set or state storing has an issue.Terraform CLI and Terraform MongoDB Atlas Provider Version
Terraform Configuration File
As we can see,
email_enabled
is set as well asinterval_min
androles
.Steps to Reproduce
terraform init
terraform apply
Expected Behavior
interval_min
is set as well asemail_enabled
androles
and a plan/apply doesn't trigger changes after change has been set.Actual Behavior
Debug Output
Crash Output
Additional Context
References
The text was updated successfully, but these errors were encountered: