简体   繁体   中英

Unable to create project in GCP CLI with user (name@gmail.com) having Owner, Project Billing Manager role

User name@gmail.com is able to create new project from GCP console. User has OWNER/Project Billing Manager role but when trying to create new project from CLI, it shows:

gcloud auth login -> Successful login with user@gmail.com

user@cloudshell:~ (gcp-ace-292306)$ gcloud auth list
   Credentialed Accounts
ACTIVE  ACCOUNT
*       user@gmail.com

user@cloudshell:~ (gcp-ace-292306)$ gcloud projects list
PROJECT_ID      NAME     PROJECT_NUMBER
gcp-ace-292306  GCP ACE  350766525882  -> This project is created in console by same user.

user@cloudshell:~ (gcp-ace-292306)$ gcloud projects create proj-100 --name=demo-project1 --enable-cloud-apis --labels=dept=it,env=prod --folder=12345
ERROR: (gcloud.projects.create) PERMISSION_DENIED: The caller does not have permission

Am I missing some other role here? Can anyone suggest a solution.

I had a similar problem although from a cloud instance.

Select IAM & Admin in the google cloud console. Select the folder you want to create the project in. 选择文件夹 Then give Project Creator role to the member which is trying to create the project.

For me the member was -compute@developer.gserviceaccount.com

If the member is not listed then you can add the member and assign roles.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM