Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
Implementation of a TTL policy for all their collections that removes the documents when the TTL date expires.
Problem you have encountered: When trying to create a TTL policy for Firestore using the command
gcloud beta firestore fields ttls update expiry --collection-group="*" --enable-ttl
it does not error out and the TTL policy is created successfully, however the TTL policy does not work as it does not delete the documents.What you expected to happen: A way to create a TTL policy through the CLI (for example using
--collection-group="*"
) that gives you the option to be aplicable to all the collections you have in Firestore.Steps to reproduce: As confirmed with the Product Team this is not an option currently, as we tried with the command mentioned above but it does not delete the documents. A workaround to reproduce the desired behavior would be by, programmatically, getting all the collections [1] and then creating a TTL policy for each one of the collections with the same “expiry” by substituting the “*” in
gcloud beta firestore fields ttls update expiry --collection-group="*" --enable-ttl
for each collection.[1]https://googleapis.dev/nodejs/firestore/latest/Firestore.html#listCollections