Custom Role Creation Error - INVALID_ARGUMENT: Permission resourcemanager.projects.list is not valid

Troubleshooting Gcloud Command Line Tool Error

Question

You are using the gcloud command line tool to create a new custom role in a project by coping a predefined role.

You receive this error message: INVALID_ARGUMENT: Permission resourcemanager.projects.list is not valid What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C.

https://cloud.google.com/iam/docs/understanding-custom-roles

The error message "INVALID_ARGUMENT: Permission resourcemanager.projects.list is not valid" indicates that the command line tool is attempting to include an invalid or non-existent permission in the custom role being created. This error message suggests that the permission "resourcemanager.projects.list" is not a valid permission.

To resolve this issue, you should review the permissions that are being included in the custom role definition and remove the invalid permission. In this case, the invalid permission is "resourcemanager.projects.list". Therefore, option C is the correct answer: remove the invalid permission and try creating the custom role again.

Option A is not a correct answer, as it suggests adding the "resourcemanager.projects.get" permission, which may not address the root cause of the error.

Option B is not a correct answer either, as it suggests trying again with a different role with a new name but the same permissions. This option does not address the root cause of the error and will likely result in the same error message being encountered.

Option D is also not a correct answer, as it suggests adding the "resourcemanager.projects.setIamPolicy" permission, which is unrelated to the error message being encountered.