I am trying to add this extension to multiple "environments" (projects)
I have followed the recommendations for setting the .env and .secret.local file as referenced here
Algolia recommends creating separate API keys - so I created an API key for each "environment": (local*, dev*)
I am using Secrets Manager to store these API keys. During the initial configuration I added my prod api key and it is stored here: projects/${param:PROJECT_NUMBER}/secrets/ext-firestore-algolia-search-ALGOLIA_API_KEY/versions/latest
I then updated my firestore-algolia-search.env.dev file to override the ALGOLIA_INDEX_NAME
But the api key is still referencing the prod api key.
I tried creating a new API key (ext-firestore-algolia-search-dev-ALGOLIA_API_KEY) and overriding that in the .env.dev
but when I went to deploy I got the following error:
Found 'projects/{PROJECT_NUMBER}/secrets/ext-firestore-algolia-search-dev-ALGOLIA_API_KEY/versions/latest' for secret param ALGOLIA_API_KEY, but this instance was previously using a different secret projects/{PROJECT_NUMBER}/secrets/ext-firestore-algolia-search-ALGOLIA_API_KEY
What is the best practice for store multiple API Keys in Secrets Manager?
I am trying to add this extension to multiple "environments" (projects) I have followed the recommendations for setting the
.env
and.secret.local
file as referenced hereAlgolia recommends creating separate API keys - so I created an API key for each "environment": (local*, dev*) I am using Secrets Manager to store these API keys. During the initial configuration I added my prod api key and it is stored here:
projects/${param:PROJECT_NUMBER}/secrets/ext-firestore-algolia-search-ALGOLIA_API_KEY/versions/latest
I then updated my
firestore-algolia-search.env.dev
file to override theALGOLIA_INDEX_NAME
But the api key is still referencing the prod api key.I tried creating a new API key (ext-firestore-algolia-search-dev-ALGOLIA_API_KEY) and overriding that in the
.env.dev
but when I went to deploy I got the following error:What is the best practice for store multiple API Keys in Secrets Manager?