I’m using mongodbatlas_event_trigger from the mongodb/mongodbatlas Terraform provider to create a database trigger. I’ve already created a database trigger through the Atlas UI, and am now attempting to replicate that through Terraform, however I get the following error on apply:
Error: error creating MongoDB EventTriggers (62xxxxxxxxxxxxxxxxxxxx05): POST https://realm.mongodb.com/api/admin/v3.0/groups/62xxxxxxxxxxxxxxxxxxxx05/apps/63xxxxxxxxxxxxxxxxxxxx64/triggers: 400 (request “”) a database trigger requires an associated Atlas cluster service
My resource block is as follows:
resource "mongodbatlas_event_trigger" "client_full_name" {
project_id = "62xxxxxxxxxxxxxxxxxxxx05"
app_id = "63xxxxxxxxxxxxxxxxxxxx64"
name = "clientFullName"
type = "DATABASE"
function_id = "63xxxxxxxxxxxxxxxxxxxx83"
disabled = false
config_operation_types = ["INSERT", "UPDATE", "REPLACE"]
config_database = "Dev"
config_collection = "clients"
config_service_id = "62xxxxxxxxxxxxxxxxxxxxcf"
config_full_document = true
config_full_document_before = false
}
Which value in the resource block would I have incorrect to be throwing that error?
(I use vars for values, they’re only hardcoded in the redacted example for debugging).