Missaratiskhona
Missaratiskhona

Reputation: 143

Is there a way to change the dataform default service account?

According to the docs, a default service account is used to manage and execute dataform in GCP.

Is there a way to use another service account instead ?

Upvotes: 1

Views: 2156

Answers (3)

philMarius
philMarius

Reputation: 684

You can now change service accounts in GCP Dataform.

You have two options, the project service account and workflow config service accounts.

The project service account can be either set in the Create Repository dialogue:

create repository dialogue with service account option

Or via the Settings tab in the project itself:

edit service account button

edit service account dialogue

Workflow config service accounts can be edited in the create / edit dialogue for individual workflow configs:

enter image description here

Upvotes: 1

Jannet Fernandez
Jannet Fernandez

Reputation: 11

Yes, you can use a custom service account. I have tried this in cloud shell.

Step 1: Please follow the instructions to create and download a private key from the Google Cloud Console in JSON format.

Step 2: Follow the steps in https://docs.dataform.co/dataform-cli to run dataform from your cloud shell.

a. At the step where you Create a credentials file using command dataform init-creds bigquery it will first ask for the location of your datasets and the location's region name.

specify location of datasets

specify location's region name

b. It now asks if you want to use the Application Default Credentials or JSON Key. Choose option 2 Option to use default credentials or JSON key

Choose option 2. It prompts you to enter the path to your Google Cloud private key file: enter image description here Provide the path to your key file json. <path/keyfile.json> A new credentials file .df-credentials.json will be written to folder containing your provided details.

Step 3: Now run dataform using command dataform run

Hope this is what you were looking for.

Upvotes: 1

kiran mathew
kiran mathew

Reputation: 2343

According to the google document ,it is not possible to use a custom service account with DataForm.DataForm creates its own service account and permissions by default.

However, there is a feature request field for the same. You can vote for this feature by clicking the "+1" and "STAR" mark to receive updates on it or you can also create a feature request thread in Google’s Public Issue Tracker.

Upvotes: 2

Related Questions