I have a question about Atlas alerts with terraform.


First post so an intro is I work with terraform and atlas.

Right now I am trying to deploy alerts with: mongodbatlas_alert_configuration using the mongodb/mongodbatlas provider, but Ive hit a bit of a wall. I cannot figure out the event_type_name for many of the required alerts. There does not seem to be a list anywhere and they dont seem to transalte 1 to 1. I am wondering if anyone could maybe provide insight here. I can get many alerts to deploy, but many more will not. Let me share an error:

│   with mongodbatlas_alert_configuration.alert_configs["CONNECTIONS"],
│   on main.tf line 50, in resource "mongodbatlas_alert_configuration" "alert_configs":
│   50: resource "mongodbatlas_alert_configuration" "alert_configs" {
│ https://cloud.mongodb.com/api/atlas/v2/groups/65970dd69c9fc237b3106d44/alertConfigs POST: HTTP 400 Bad Request (Error code:
│ "INVALID_ENUM_VALUE") Detail: An invalid enumeration value CONNECTIONS was specified. Reason: Bad Request. Params: [CONNECTIONS]

If anyone has seen this or has any insight it would be greatly appreciated!

we intentionally do not expose list of eventTypeName values in Terraform docs since this list is always changing. instead we link back to Atlas Admin API Open API Spec which has full list always if helpful - MongoDB Atlas Administration API

1 Like