In my gitlab-ci.yml I'm running a script to create a scheduler job. When I run it directly in the GCP terminal, it works succesfuly. But, when doing it with the deployment pipeline, it shows the following error:
ERROR: (gcloud.scheduler.jobs.create.app-engine) PERMISSION_DENIED: The principal (user or service account) lacks IAM permission "cloudscheduler.jobs.create" for the resource "projects/{NAME OF A DIFFERENT PROJECT}/locations/us-central" (or the resource may not exist).
The issue here is that the resource stated in the erro is not the one where I'm deploying my app. Meaning, I'm not trying to create the Scheduler Job in that project. I was using gcloud.scheduler.jobs.create.http but it didn't work as well, because I'm trying to creat a Scheduler Job that targets a service deployed in the same App Engine app.