Create Atlas App Services and Link Them To Clusters with Terraform
It would be great to create App Services (Realm Apps) and then create the service link to an Atlas Cluster with Terraform.
This is so that Trigger resources can be created fully within Terraform, rather than having to hack together API calls, CLI commands or manual steps.
Since it depends on references to the following types, the existing feature to define triggers via Terraform is somewhat incomplete. Please consider prioritizing a partial/iterative follow-through with basic support for these two resource types expected by† the provider (https://github.com/mongodb/terraform-provider-mongodbatlas):
* App-Services App
* API reference: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#tag/apps/operation/adminCreateApplication
* Comparable feature from realm-cli: https://www.mongodb.com/docs/atlas/app-services/reference/config/app/
* App-Services Data Source
* API reference: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#tag/services/operation/adminCreateService
* Comparable feature from realm-cli: https://www.mongodb.com/docs/atlas/app-services/reference/config/data_sources/
AdminZuhair (Admin, MongoDB) commented
Thanks for sharing feedback Will. We are planning on exposing a greater number of App Services resources in Terraform, but this effort is still several quarters away. In the interim you can leverage the App Service API or Atlas UI. Hope this helps. See here for more details: https://www.mongodb.com/docs/atlas/app-services/manage-apps/create/create-with-api/