Closed TazBruce closed 1 year ago
contain a Firestore/Datastore database to a single microservice
Memo: This "contain" means "limit". This is a request to limit a (micro)service to use only a certain "database" (Pre-GA Offerings) https://cloud.google.com/firestore/docs/manage-databases#create_a_database.
I'm looking for the same mechanism too :)
Created a PR for Datastore: https://github.com/GoogleCloudPlatform/spring-cloud-gcp/pull/2150
Is your feature request related to a problem? Please describe. It is currently quite difficult to contain a Firestore/Datastore database to a single microservice. Currently the only solution is to use the (default) database and ensure microservices do not use the same collection names.
Describe the solution you'd like GCP has recently added support for multiple databases, meaning it's now possible to assign one per microservice. This could possibly be implemented by creating an optional system property such as
spring.cloud.gcp.firestore.database = "xyz"
Describe alternatives you've considered This could also possibly be implemented by adding the field to a Document annotation such as
@Document(collectionName="users", databaseName="xyz")
Thanks!