teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

2020/04/07 08:40

投稿

yaoriku_ava
yaoriku_ava

スコア25

title CHANGED
File without changes
body CHANGED
@@ -1,8 +1,8 @@
1
- Firebaseで、firebase deploy --only functionsとして作成した関数をデプロイしようとすると、
1
+ Firebaseで、プロジェクトAにデプロイしていた関数を、firebase use <プロジェクトBのID>としてからfirebase deploy --only functionsとしてプロジェクトBにもデプロイしようとすると、
2
2
 
3
3
  ⚠ functions[movePastEvent(us-central1)]: Deployment error.
4
- 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: '**__<現在のプロジェクトとは異なるプロジェクトID>__**@cloudbuild.gserviceaccount.com' by following the instructions at https://cloud.google.com/access-context-manager/docs/create-access-level#members-example.
4
+ 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.
5
5
 
6
6
  と表示され、最後にFunctions did not deploy properly.とのエラーが吐き出されてしまいます。
7
7
 
8
- Google cloud platformのIAMから指定されたアカウンアクセスを許可しようとして、プロジェクトIDが異なるためにうまくいきません。このエラー一体どういうことなのでしょうか...。
8
+ 再びfirebase use <プロジェクAID>としてデプロイすると成功するのですが異なるプロジェクトに同じ関数をデプロイするためには、firebase useでプロジェクトを切り替える以外にも何かする必要があるのでしょうか