Search code examples
google-cloud-dataflowterraform-provider-gcp

How to fix "There is no cloudservices robot account for your project. Please ensure that the Dataflow API is enabled 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: IAM accounts

Does anyone know how to add this cloudservices robot account?


Solution

  • I got the same error when running terraforms and it seems to be solved when recreating the job.

    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