Build Datastore composite index configurations with kind, ancestor settings, and property sort directions.
Last verified: May 2026
Build Datastore composite index configurations with kind, ancestor settings, and property sort directions.
Required Fields
indexesOutput will appear here...Build Datastore composite index configurations with kind, ancestor settings, and property sort directions. This tool helps GCP engineers generate valid configurations quickly without consulting documentation, reducing errors and accelerating infrastructure deployment. All processing runs in your browser with no data sent to external servers.
No — generating a Datastore Index configuration is independent of the IAM roles required to apply it. Apply the output with a principal that has the documented permissions for that service. For least-privilege scoping, GCP's Policy Intelligence and the Role Recommender produce permission lists scoped to actual usage.
The Datastore Index options surface what is currently documented in the Google Cloud reference for that service. When Google adds a new property or value, we add it here after verifying the schema in a real project. If a recently-announced feature is not yet selectable, treat that as a 'not yet supported' signal rather than an opinion that it should not be used.
Your team's app started throwing 'NoIndexException' errors after adding a new query pattern: list orders for a customer sorted by date desc. The error message specifies the needed composite index. The builder generates the index.yaml entry: kind=Order, properties=[customerId ASC, orderDate DESC]. Deploy via gcloud, wait for index build (~5 minutes for moderate datasets, hours for large), errors stop. Future code reviews catch missing indexes earlier — the builder shows what's needed for each new query pattern before deploy.
The builder constructs Datastore composite index definitions: index resource (kind: the entity type, properties array with name + direction: ASCENDING/DESCENDING, ancestor: NONE or ALL_ANCESTORS for hierarchical indexes). Output is generated as index.yaml entries (the standard Datastore index config format) deployed via `gcloud datastore indexes create index.yaml`, plus Terraform google_datastore_index resources.
Datastore (and Firestore in Datastore mode) requires composite indexes for queries that filter on multiple fields or combine filters with sorting. The default exception 'NoIndexException' tells you exactly which index is needed — copy the suggestion into index.yaml and deploy.
Excessive indexes are a write performance killer — each write triggers updates to every index containing the entity's properties. Audit indexes regularly; if a query pattern is no longer used, drop the index. The console's 'index usage' tab shows when each index was last used.
Consider migrating from Datastore to Firestore in Native mode for new applications. Firestore Native is the actively-developed Google document database with stronger consistency, better SDKs, and new features. Datastore mode is essentially legacy — fine for existing apps, not recommended for greenfield.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.