Open MaitreyaBuddha opened 8 months ago
In Firestore, indexes are defined for all collections of the same id (the query scope then defines if you want to query within a collection or across the entire collection group).
In this case, defining the collection as collection
, would create the index for the sub-collection people/<person>/collection
.
Defining an index on the collection ~2Fpeople~2F${var.coach_id}~2Fcollection
won't create an index on the subcollection, but rather on a collection named "people/${var.coach_id}/collection".
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v1.6.4 on darwin_arm64
Your version of Terraform is out of date! The latest version is 1.6.6. You can update by downloading from https://www.terraform.io/downloads.html
Affected Resource(s)
google_firestore_index
Terraform Configuration Files
Ex:
Debug Output
Panic Output
Expected Behavior
Works for nested collections.
Actual Behavior
Get a 404 from
/v1/projects/***/databases/(default)/collectionGroups/people/john-doe/collection/indexes
Steps to Reproduce
terraform apply
Important Factoids
Workaround (and fix?) is to use what firestore uses in the URL, ex:
References
0000
b/319998569