Firebaseで、プロジェクトAにデプロイしていた関数を、firebase use <プロジェクトBのID>としてからfirebase deploy --only functionsとしてプロジェクトBにもデプロイしようとすると、
⚠ functions[movePastEvent(us-central1)]: Deployment error.
Build failed: Unable to build your function due to VPC Service Controls. The Cloud Build service account associated with this function needs an appropriate access level on the service perimeter. Please grant access to the Cloud Build service account: '<プロジェクトA, Bとは異なるプロジェクトID>@cloudbuild.gserviceaccount.com' by following the instructions at https://cloud.google.com/access-context-manager/docs/create-access-level#members-example.
と表示され、最後にFunctions did not deploy properly.とのエラーが吐き出されてしまいます。
再びfirebase use <プロジェクトAのID>としてデプロイすると成功するのですが、異なるプロジェクトに同じ関数をデプロイするためには、firebase useでプロジェクトを切り替える以外にも何かする必要があるのでしょうか?
あなたの回答
tips
プレビュー