Make the app_id optional in the mongodbatlas_event_trigger resource when an aws_eventbridge event processor is defined
Currently, when you define a trigger that uses the AWS Eventbridge via the UI it auto creates a realm App that links the DB change to the event bridge.
However, with the mongodbatlaseventtrigger resource you have to manually defined an empty realm app and give the resource the app_id of that empty app.
This is obviously not a 100% automated process.
This could be, if the provider created the empty realm app by itself, then referencing the created app app_id.
This would only be needed:
1. when the appid is not provided
2. the following attribute was provided
eventprocessors {
awseventbridge {
configaccountid = "AWS ACCOUNT ID"
configregion = "AWS REGIOn"
}
}
3. otherwise use the provided app_id
This would still support the case when the eventbridge even processor was used and a pre-existing realm app with custom logic was also defined.
This would make the provision of an Eventbridge trigger totally automated.
![](https://secure.gravatar.com/avatar/2305a1d5a08c450410f9fcac2c2b7c32?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)