Swordfish
Swordfish

Reputation: 1281

Setting up shared services for projects in GCP

I would like to set up some shared services (e.g. neo4j, MongoDB, and Kafka) in GCP. These services would be used by various applications (separate GCP projects). The services would not be publicly accessible, they should only be network accessible from our other GCP projects in our account. Each application would have a separate database.

My idea is to set up the services within a standalone project (e.g managed-services-prod, managed-services-test), etc. What would be the best way for the applications to access the shared services using GCP?

Upvotes: 0

Views: 447

Answers (1)

Sergiusz
Sergiusz

Reputation: 1235

Recapping for better visibility:

  1. Google recommends creating organization to manage multiple projects.
  2. You can create a Service Account and grant it access to resources in different project:
gcloud projects add-iam-policy-binding $PROJECT_1 \
--member=serviceAccount:${PROJECT_2}@appspot.gserviceaccount.com \
--role=roles/cloudbuild.builds.viewer \

You can find more info here.

Upvotes: 1

Related Questions