Fill the values in vars.tf
Create a .env in main directory with following fields:
VITE_FIREBASE_API_KEY= API KEY HERE // After step 3.
VITE_FIREBASE_APP_ID= APP ID HERE // After step 3.
VITE_FIREBASE_USE_EMULATOR=false
VITE_FIREBASE_AUTH_DOMAIN=notesreader.firebaseapp.com
VITE_STORAGE_BUCKET_DEFUALT=notesreader.appspot.com
VITE_HTTPFUNCTION_URL = DEPLOYED FUNCTION URL
VITE_PROJECT_ID=notesreader
VITE_CLOUDFUNCTION_REGION = europe-west1
Run terraform init
and terraform apply
Fill the missing values in .env (API KEY and APP ID)
Edit functions/src/consts.ts to comply with the values entered in .env (PROJECT_NAME)
Enable Authentication by email and Google in Firebase console
Run firebase deploy --only functions
Run gsutil cors set cors.json gs://notesreader.appspot.com
Run firebase experiments:enable webframeworks
Make sure you are on Node 20 and Run firebase deploy