How to fix "There is no cloudservices robot account for your project."

We are using Terraform to deploy the resouce “google_dataflow_job” on Google Cloud. We did a successfully deployement few weeks ago (Dataflow API is already enabled since years).

We now get this error when we are executing a “terraform plan”

Error: Error when reading or editing Dataflow job 2020-10-07_06_20_01-18099947630909311965: googleapi: Error 400: (10a8bef84dbdde13): There is no cloudservices robot account for your project. Please ensure that the Dataflow API is enabled for your project., failedPrecondition

We have theses accounts:

Does anyone know how to add this cloudservices robot account?

Please check the following list:

  1. Check under APIs & Services to see if the Dataflow API is enabled. If you only enabled it, give it some time to update.
  2. There should be service accounts for [project-number]-compute@developer.gserviceaccount.com and service-[project-number]@dataflow-service-producer-prod.iam.gserviceaccount.com Contact dataflow support or build and assign a Cloud Dataflow Service Agent role if dataflow-service-producer-prod wasn’t generated. Create a shared VPC in the host project if you’re using one, then assign the Compute Network User role.

Quick possible solutions are:

  • Try again and get a fresh failed job id.
  • Try to disable and enable the dataflow API and see if it works.
1 Like

Hello,

We managed the problem folowing thoses steps :

I did the following steps:

  1. Cancel the job from the console
  2. Remove the job from terraform state
  3. rerun terraform in order to create the dataflow job again

Thank you.

1 Like