Hi,
We have a number of systems and projects using Google Cloud Tasks, all creating and dispatching HTTP target tasks.
As of approximately 2024-07-22 21:07 UTC all our task creation attempts have been failing with a PERMISSION_DENIED and the message "Failed to create cloud task: App Engine targets require "appengine.applications.get" IAM permission (https://cloud.google.com/appengine/docs/admin-api/access-control) and the API_CLOUD_PLATFORM scope (https://www.googleapis.com/auth/cloud-platform)."
Nothing has changed in our application code, deployment, or GCP configuration in this time window - the running apps were creating tasks fine up until 21:07 UTC and then suddenly started to hit the permissions error.
We don't use AppEngine at all - all of our tasks are HTTP target tasks, some to GCP-native endpoints (e.g. Cloud Run) and others to our own applications behind Google Loadbalancer.
As far as I can see this is a change / error at the GCP end, but there is not currently anything showing on the service health dashboard.
We don't have a paid technical support contract with GCP, so I can't find any way to report the issue.
Any suggestions welcome!
I've also reported this on the Cloud Tasks issue tracker at https://issuetracker.google.com/issues/354741406 - although given it looks like Cloud Tasks issues there haven't had any responses since late 2023 I'm not sure if anyone will see that.
I have also confirmed that adding the `appengine.applications.get` permission to the service accounts that create tasks (which currently only have the Cloud Tasks Enqueuer role) seems to workaround the issue for now.
Same problem here !!!
Restarting my app temporarily solved the issue. But the problem appeared again after a few days. Will try OP's way: granting the unnecessary permission.
Tried OP's way on July 29, it worked for a couple of days and then the problem appeared again today.