cloudtasks.CreateTask fails: `lacks IAM permission “cloudtasks.tasks.create”` even though my account has that permission
问题 I'm following the Creating HTTP Target tasks guide. When I run the code posted below I get this error: cloudtasks.CreateTask: rpc error: code = PermissionDenied desc = The principal (user or service account) lacks IAM permission "cloudtasks.tasks.create" for the resource "projects/my_project/locations/europe-west1/queues/my_queue" (or the resource may not exist). I have signed in with gcloud auth login my@email.com . my@email.com has the following permissions set by my custom cloud task role: