0

Is there a way to import/export composite index keys in GCP?

At the moment I have to recreate all my composite index keys manually with new environments. I'm really hoping that there's a significantly better way of doing this.

I'm aware that it outputs the link to create a link on query, but again I'm hoping making all the queries and clicking on the link, or manually recreating them aren't the only options.

PS - I'm aware I can make the composite keys using gcloud shell, I want to know if there's a way of exporting so I don't have to recreate all my existing ones. Or part of my CI/CD pipeline, to export indexes from dev for example.

Any help is greatly appreciated.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Ali_R
  • 121
  • 2
  • 10
  • 1
    I linked what seems like what you want. But if that doesn't work for you check some of the other results from this search: https://www.google.com/search?q=firestore+export+indexes – Frank van Puffelen Dec 13 '20 at 16:10
  • Omg! I just spent 2 hours writing a script to create a script out of the json export!... and I got your answer. Thank you, this is definitely a better way forward., – Ali_R Dec 13 '20 at 19:03

0 Answers0