问题描述
我已添加了角色"Cloud Tasks Enqueuer",到我的[email protected]服务帐户(请参阅第一个屏幕截图).但是,当我尝试检查帐户是否有权调用"cloudtasks.tasks.create"时,它表示服务帐户缺少cloudtasks.enquerer角色(第二张屏幕截图).怎么了?
(注意:我正在添加此角色来尝试解决其他问题,)
糟糕,原来我有两个名称相似的项目,我感到困惑. Firebase项目是通过Firebase创建的,project-prod
,而Google Cloud项目是通过Google Cloud创建的,project
.
因此,我为正确的服务帐户授予了权限,但为错误的项目授予了权限.调试器工作正常!
I have added the role "Cloud Tasks Enqueuer" to my [email protected] service account (see first screenshot). However, when I try and check if the account has permission to call "cloudtasks.tasks.create" it says that the service account lacks the cloudtasks.enquerer role (second screenshot). What is going wrong?
(note: I am adding this role to try and solve my other question, creating Google Cloud Task in a firebase function)
Whoops, turned out that I had two projects with similar names, and I got confused. The firebase project was project-prod
created through firebase, and the google cloud project was project
created through google cloud.
Therefore, I granted permissions to the correct service account but for the wrong project. The debugger was working correctly!
这篇关于Google Cloud Policy Troubleshooter说,尽管在IAM中分配了服务帐户,但该帐户没有权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!