Google Cloud Platform (GCP)¶
Note
Use Amazon Web Services (AWS), unless an application requires access to Google-exclusive services like Google Drive.
Maintenance¶
See also
Periodically review all projects:
Snapshot the configuration of the organization and its projects:
uv run manage.py gcp snapshot > services/gcp.txt
Limitations
No API exposes OAuth 2.0 client IDs, Domain-wide Delegation or App Access Control. Track these under Known projects.
To reduce noise, the command omits: volatile fields (
etag,generation,metageneration,selfLink,updateTime,updated), asset types reported twice, and Logs Explorer history.Google Workspace creates a project per Apps Script in the
system-gsuitefolder, which is skipped along with its descendants.Run
git diffto review changes since the last snapshot, then commit the file.
To manually review one project:
Review Enabled APIs & services, or:
gcloud services list --enabled --project=$PROJECT
Review Credentials, or:
gcloud iam service-accounts list --project=$PROJECT
gcloud asset search-all-iam-policies --scope=projects/$PROJECT
for account in (gcloud iam service-accounts list --project=$PROJECT --format="value(email)") echo "== $account" gcloud iam service-accounts keys list --iam-account=$account --managed-by=user end
Review Asset Inventory, or:
gcloud asset search-all-resources --scope=projects/$PROJECT --format="table(assetType, displayName, location, state, createTime)" \ | grep -vE 'cloudresourcemanager\.googleapis\.com/Project|logging\.googleapis\.com/(LogBucket|LogSink)|iam\.googleapis\.com/ServiceAccount|serviceusage\.googleapis\.com/Service'
Review history in the Activity tab, or:
gcloud logging read 'severity>=DEFAULT' --project=$P --freshness=400d --limit=30 --order=desc \ --format="table(timestamp, resource.type, protoPayload.methodName, protoPayload.authenticationInfo.principalEmail)"
Review API requests in the last 6 weeks (the retention period), in Metrics Explorer, using the
serviceruntime.googleapis.com/api/request_countmetric.Review spend in the billing account’s Reports, grouped by project.
DREAM¶
Use a separate gcloud configuration for dream-office.org:
gcloud config configurations create dream-office --no-activate
env CLOUDSDK_ACTIVE_CONFIG_NAME=dream-office gcloud auth login
Then, run set CLOUDSDK_ACTIVE_CONFIG_NAME dream-office before the commands above, and snapshot with uv run manage.py gcp snapshot -o 77010139352 > services/gcp-dream-office.txt.
Known projects¶
- Project ID
dream-bi- Contact
Andrii
- Documentation
- Configuration
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETin deploy-pillar-privateGOOGLE_APPLICATION_CREDENTIALSin vibes
- APIs
- Credentials
DREAM BI Qlik loginfor Qlik Sense Authentication APIgoogle-analytics-data@dream-bi.iam.gserviceaccount.comto use APIs in vibes
- Project ID
gam-project-9yro6- Contact
James
- Documentation
- Configuration
~/.gam/directory- APIs
- Credentials
GAMforgamcommandsgam-project-9yro6@gam-project-9yro6.iam.gserviceaccount.comforgam usercommands
- Project ID
ocp-analytics-mcp- Contact
James
- Documentation
- Configuration
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETsecrets in thegoogle-analytics-mcpCloudflare Worker- APIs
Google Analytics Admin API
Google Analytics Data API
- Credentials
OAuth client to use Sign in with Google and APIs in google-analytics-mcp
- Project ID
gyb-project-haj-zu2-x36- Contact
James
- Documentation
- Configuration
~/bin/gyb/directory (--config-folderto override)- APIs
- Credentials
GYBforgybcommandsgyb-project-haj-zu2-x36@gyb-project-haj-zu2-x36.iam.gserviceaccount.comforgybcommands
- Project ID
ocp-library- Contact
James
- Documentation
The New York Times Library
- Configuration
Heroku settings
- APIs
Google Drive API
Note
Reading history is unused; it needs
GCP_PROJECT_ID.- Credentials
libraryto use Sign in with Googlecloud-datastore-user@ocp-library.iam.gserviceaccount.comto use APIs in nytimes/library
- Project ID
pelican-289615- Contact
James
- Documentation
- Configuration
pelican-289615in deploy and deploy-pillar-private- APIs
Google Docs API
Google Drive API
- Credentials
pelican@pelican-289615.iam.gserviceaccount.comto use APIs in pelican-frontend
Troubleshoot¶
If an administrator lacks access to a project, run, for example:
gcloud projects add-iam-policy-binding ocds-172716 --member user:jmckinney@open-contracting.org --role roles/owner
If the user interface lacks access to an organization, run, for example:
gcloud organizations add-iam-policy-binding organizations/1015889055088 --member domain:open-contracting.org --role roles/recommender.viewer