Conceder papéis de conta de serviço para o Dataproc
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, descrevemos como conceder o papel de usuário da conta de serviço
na conta de serviço do Dataproc ao agente de serviço do Cloud Data Fusion
para permitir que ele provisione e execute pipelines em clusters do Dataproc.
Se você usa uma conta de serviço padrão do Compute Engine ou uma gerenciada pelo usuário
nas máquinas virtuais de um cluster, é necessário conceder o
papel de usuário da conta de serviço ao Cloud Data Fusion. Caso contrário,
o produto não poderá provisionar um cluster do Dataproc,
e o seguinte erro será exibido quando você executar um pipeline de dados:
PROVISION task failed in REQUESTING_CREATE state for program run [pipeline-name] due to Dataproc operation failure: INVALID_ARGUMENT: User not authorized to act as service account '[service-account-name]'
Conseguir o nome da conta de serviço
No Google Cloud console, acesse a página "Gerenciamento de identidade e acesso". Acessar a página "IAM"
No seletor de projetos na parte de cima da página, escolha o projeto, a pasta ou a organização à qual a instância do Cloud Data Fusion pertence.
Encontre e copie o nome da conta de serviço do Cloud Data Fusion. Use o seguinte formato: service-[project-number]@gcp-sa-datafusion.iam.gserviceaccount.com.
Clique em Selecionar um projeto, escolha aquele em que está localizada a conta de serviço que você quer usar para o cluster do Dataproc e clique em Abrir.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-12 UTC."],[[["\u003cp\u003eTo allow Cloud Data Fusion to provision and run pipelines on Dataproc clusters, the Cloud Data Fusion Service Agent must be granted the Service Account User role on the Dataproc Service Account.\u003c/p\u003e\n"],["\u003cp\u003eFor Dataproc service accounts, it's also necessary to grant \u003ccode\u003edatafusion.instances.runtime\u003c/code\u003e permission to enable access to Cloud Data Fusion runtime resources.\u003c/p\u003e\n"],["\u003cp\u003eIf the Service Account User role is not granted, Cloud Data Fusion will be unable to provision a Dataproc cluster, resulting in an error during pipeline execution.\u003c/p\u003e\n"],["\u003cp\u003eThe Cloud Data Fusion runner role and Cloud Storage admin role must be granted to service accounts used by Dataproc to authorize the execution of Cloud Data Fusion pipelines and access Cloud Storage resources.\u003c/p\u003e\n"],["\u003cp\u003eYou can grant these permissions in the UI when you create an instance starting in Cloud Data Fusion versions 6.2.3, alternatively you can follow the manual steps provided to grant these roles.\u003c/p\u003e\n"]]],[],null,["# Grant service account roles for Dataproc\n\nThis page describes how to grant the [Service Account User](/iam/docs/service-account-permissions#user-role)\nrole on Dataproc Service Account to Cloud Data Fusion Service\nAgent to allow it to provision and run pipelines on Dataproc\nclusters.\n\nFor service accounts that are used by Dataproc, you also need to\n[grant `datafusion.instances.runtime` permission](#runtime-permission) to access\nCloud Data Fusion runtime resources.\n| **Note:** Starting in Cloud Data Fusion versions 6.2.3, you can grant these permissions in the UI when you create an instance. \n| To get the permissions that you need to create a Cloud Data Fusion instance, ask your administrator to grant you the [Service Account Admin](/iam/docs/understanding-roles#iam.serviceAccountAdmin) (`roles/iam.serviceAccountAdmin`) IAM role on the Dataproc service account.\n\nWhether you use a user-managed service account, or the default Compute Engine\nservice account on the virtual machines in a cluster, you must grant the\nService Account User role to Cloud Data Fusion. Otherwise,\nCloud Data Fusion cannot provision a Dataproc cluster\nand the following error appears when you execute a data pipeline:\n\n`PROVISION task failed in REQUESTING_CREATE state for program run [pipeline-name] due to Dataproc operation failure: INVALID_ARGUMENT: User not authorized to act as service account '[service-account-name]'`\n\nGet the service account name\n----------------------------\n\n1. In the Google Cloud console, go to the Identity and Access Management page. \n [Go to the IAM page](https://console.cloud.google.com/iam-admin/iam)\n2. From the project selector at the top of the page, choose the project, folder, or organization to which the Cloud Data Fusion instance belongs.\n3. Find and copy the [Cloud Data Fusion service account](/data-fusion/docs/concepts/service-accounts#service_account_table) name. Use the following format: `service-[project-number]@gcp-sa-datafusion.iam.gserviceaccount.com`.\n\nGive service account user permission\n------------------------------------\n\n1. In the Google Cloud console, go to the **Service Accounts** page. \n [Go to the Service Accounts page](https://console.cloud.google.com/iam-admin/serviceaccounts)\n2. Click **Select a project** , choose a project where the service account you want to use for the Dataproc cluster is located, and then click **Open**.\n3. Click the email address of the [Dataproc service account](/dataproc/docs/concepts/configuring-clusters/service-accounts).\n\n | When Cloud Data Fusion provisions a Dataproc cluster, you can specify which user-managed service account to use for the Dataproc virtual machines in that cluster. If a service account is not specified, the default Compute Engine service account is used, which is in the format of `[project-number]-compute@developer.gserviceaccount.com`.\n4. Click the **Permissions** tab. The page displays a list of principals that\n have been granted roles on the service account.\n\n5. Click person_add **Grant access**.\n\n6. In the **New principals** field, paste the Cloud Data Fusion service\n account name that you previously copied.\n\n7. Select the **Service Account User** role.\n\n8. Click **Save**.\n\nGrant roles to Dataproc service accounts\n----------------------------------------\n\n### Grant runner role permission\n\nGrant the [Cloud Data Fusion runner role](/iam/docs/understanding-roles#cloud-data-fusion-roles)\n(`roles/datafusion.runner`) to service accounts that are used by\nDataproc. This authorizes the Dataproc service\naccount to run Cloud Data Fusion pipelines in your [project](/data-fusion/docs/concepts/security#projects).\nFor more information, see [Requiring permission to attach service accounts to resources](/iam/docs/service-accounts-actas).\n\n### Grant Cloud Storage admin permission\n\nIn Cloud Data Fusion versions 6.2.0 and above, grant the\n[Cloud Storage admin role](/storage/docs/access-control/iam-roles#standard-roles)\n(`roles/storage.admin`) to service accounts that are used by\nDataproc in your [project](/data-fusion/docs/concepts/security#projects).\n\nWhat's next\n-----------\n\n- Learn more about [Access control](/data-fusion/docs/access-control) in Cloud Data Fusion.\n- Learn more about Cloud Data Fusion [service accounts](/data-fusion/docs/concepts/service-accounts)."]]